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