| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function handleShipDestruction( |
||
| 19 | ?ShipDestroyerInterface $destroyer, |
||
| 20 | ShipWrapperInterface $destroyedShipWrapper, |
||
| 21 | ShipDestructionCauseEnum $cause, |
||
| 22 | InformationInterface $informations |
||
| 23 | ): void { |
||
| 24 | |||
| 25 | //leave ship if there is crew |
||
| 26 | if ($destroyedShipWrapper->get()->getCrewCount() > 0) { |
||
| 27 | $msg = $this->shipLeaver->evacuate($destroyedShipWrapper); |
||
| 28 | |||
| 29 | $informations->addInformation($msg); |
||
| 30 | } |
||
| 33 |