(array &$checks, string $key, string $label, string $state, string $message = '')
| 46 | } |
| 47 | |
| 48 | private static function addCheck(array &$checks, string $key, string $label, string $state, string $message = ''): void |
| 49 | { |
| 50 | $normalizedState = in_array($state, ['ok', 'fail', 'skipped', 'unknown'], true) ? $state : 'unknown'; |
| 51 | $checks[] = [ |
| 52 | 'key' => $key, |
| 53 | 'label' => $label, |
| 54 | 'state' => $normalizedState, |
| 55 | 'message' => trim($message), |
| 56 | ]; |
| 57 | } |
| 58 | |
| 59 | private static function stateToBool(string $state): ?bool |
| 60 | { |