Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 76.47% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait SpacecraftStorageTrait |
||
11 | { |
||
12 | use SpacecraftTrait; |
||
13 | |||
14 | 14 | public function getStorageSum(): int |
|
20 | 14 | ); |
|
21 | } |
||
22 | |||
23 | 13 | public function getMaxStorage(): int |
|
24 | { |
||
25 | 13 | return $this->getRump()->getStorage(); |
|
|
|||
26 | } |
||
27 | |||
28 | 8 | public function getBeamableStorage(): Collection |
|
31 | } |
||
32 | |||
33 | public function getStoredShuttles(): Collection |
||
34 | { |
||
35 | return $this->getThis()->getStorage() |
||
36 | ->map(fn(StorageInterface $storage): CommodityInterface => $storage->getCommodity()) |
||
37 | ->filter(fn(CommodityInterface $commodity): bool => $commodity->isShuttle()); |
||
38 | } |
||
39 | |||
40 | 2 | public function hasStoredBuoy(): bool |
|
44 | } |
||
45 | } |
||
46 |