| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function destroy( |
||
| 23 | ?ShipDestroyerInterface $destroyer, |
||
| 24 | ShipWrapperInterface $destroyedShipWrapper, |
||
| 25 | ShipDestructionCauseEnum $cause, |
||
| 26 | InformationInterface $informations |
||
| 27 | ): void { |
||
| 28 | |||
| 29 | array_walk( |
||
| 30 | $this->destructionHandlers, |
||
| 31 | function (ShipDestructionHandlerInterface $handler) use ( |
||
| 32 | $destroyer, |
||
| 33 | $destroyedShipWrapper, |
||
| 34 | $cause, |
||
| 35 | $informations |
||
| 36 | ): void { |
||
| 37 | $handler->handleShipDestruction( |
||
| 38 | $destroyer, |
||
| 39 | $destroyedShipWrapper, |
||
| 40 | $cause, |
||
| 41 | $informations |
||
| 42 | ); |
||
| 47 |