value}"); } public function getColor(): string { return match ($this) { self::Ok => 'success', self::Warning => 'warning', self::Error => 'danger', }; } public function getIcon(): string { return match ($this) { self::Ok => 'heroicon-o-check-circle', self::Warning => 'heroicon-o-exclamation-triangle', self::Error => 'heroicon-o-x-circle', }; } public function isProblem(): bool { return $this !== self::Ok; } public function weight(): int { return match ($this) { self::Error => 0, self::Warning => 1, self::Ok => 2, }; } }