Lines
100.00%
2 / 2
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| isNamed | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 9 | final readonly class Floor | |
| 10 | { | |
| 11 | /** @param list<string> $aliases */ | |
| 12 | public function __construct( | |
| 13 | public FloorId $floorId, | |
| 14 | public string $name, | |
| 15 | public ?int $level = null, | |
| 16 | #[ListOf('string')] | |
| 17 | public array $aliases = [], | |
| 18 | public ?string $icon = null, | |
| 19 | ) {} | |
| 20 | ||
| 21 | public function isNamed(string $name): bool | |
| 22 | { | |
| 23 | return RegistryNames::containsName($name, $this->name, ...$this->aliases); | |
| 24 | } | |
| 25 | } |