Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 6 | protected function getStoredShuttleCount(SpacecraftInterface $spacecraft): int |
|
20 | { |
||
21 | 6 | return $spacecraft->getStorage() |
|
22 | 6 | ->filter(fn(StorageInterface $storage): bool => $storage->getCommodity()->isShuttle()) |
|
23 | 6 | ->reduce(fn(int $value, StorageInterface $storage): int => $value + $storage->getAmount(), 0); |
|
24 | } |
||
26 |