| Total Complexity | 9 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class SpacecraftStorageTorpedoLogic |
||
| 13 | { |
||
| 14 | public function canTransferTorpedos(SpacecraftInterface $spacecraft, InformationInterface $information): bool |
||
| 15 | { |
||
| 16 | if (!$spacecraft->isSystemHealthy(SpacecraftSystemTypeEnum::TORPEDO_STORAGE)) { |
||
| 17 | $information->addInformation("Das Torpedolager ist zerstört"); |
||
| 18 | return false; |
||
| 19 | } |
||
| 20 | |||
| 21 | return true; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function canStoreTorpedoType(SpacecraftInterface $spacecraft, TorpedoTypeInterface $torpedoType, InformationInterface $information): bool |
||
| 51 | } |
||
| 52 | } |
||
| 53 |