You've already forked Atomcms-edit
refactor: integrate diagnostics into Commandocentrum and split EmulatorUpdateService
- 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
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user