You've already forked Atomcms-edit
f5666c104d
- Add DiagnosticRunner integration to Commandocentrum for system health display - Refactor EmulatorUpdateService from 2524 lines to 395 lines (facade pattern) - Extract EmulatorStatusService, EmulatorJarService, EmulatorSourceService - Extract EmulatorBuildService, EmulatorSqlService, EmulatorBackupService - Add shared EmulatorConfiguration trait for dependency injection - Preserve backward compatibility on all public methods
29 lines
748 B
PHP
Executable File
29 lines
748 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Services\Diagnostics;
|
|
|
|
class DiagnosticResult
|
|
{
|
|
public function __construct(
|
|
public readonly string $name,
|
|
public readonly string $status = 'ok',
|
|
public readonly string $message = '',
|
|
public readonly ?string $fix = null,
|
|
) {}
|
|
|
|
public static function ok(string $name, string $message = ''): self
|
|
{
|
|
return new self($name, 'ok', $message);
|
|
}
|
|
|
|
public static function warning(string $name, string $message, ?string $fix = null): self
|
|
{
|
|
return new self($name, 'warning', $message, $fix);
|
|
}
|
|
|
|
public static function error(string $name, string $message, ?string $fix = null): self
|
|
{
|
|
return new self($name, 'error', $message, $fix);
|
|
}
|
|
}
|