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 | ||
| find | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 10 | final readonly class Drops | |
| 11 | { | |
| 12 | /** @param array<int, HeldItem> $items */ | |
| 13 | public function __construct( | |
| 14 | public array $items = [], | |
| 15 | ) {} | |
| 16 | ||
| 17 | public function find(ItemId $id): ?HeldItem | |
| 18 | { | |
| 19 | return $this->items[$id->value] ?? null; | |
| 20 | } | |
| 21 | } |