36 lines
685 B
PHP
36 lines
685 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\MiningChecker\Support;
|
|
|
|
final class DebugState
|
|
{
|
|
private static array $trace = [];
|
|
private static ?string $latestFilePath = null;
|
|
|
|
public static function replace(array $trace): void
|
|
{
|
|
self::$trace = $trace;
|
|
}
|
|
|
|
public static function export(): array
|
|
{
|
|
return self::$trace;
|
|
}
|
|
|
|
public static function clear(): void
|
|
{
|
|
self::$trace = [];
|
|
}
|
|
|
|
public static function setLatestFilePath(?string $filePath): void
|
|
{
|
|
self::$latestFilePath = $filePath;
|
|
}
|
|
|
|
public static function latestFilePath(): ?string
|
|
{
|
|
return self::$latestFilePath;
|
|
}
|
|
}
|