| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function action(FleetWrapperInterface $fleet, PirateReactionInterface $pirateReaction): ?PirateBehaviourEnum |
||
| 25 | { |
||
| 26 | $leadWrapper = $fleet->getLeadWrapper(); |
||
| 27 | $leadShip = $leadWrapper->get(); |
||
| 28 | |||
| 29 | $supportFleet = $this->pirateCreation->createPirateFleet($leadShip); |
||
| 30 | $this->logger->logf( |
||
| 31 | ' created support fleet %d "%s" here %s', |
||
| 32 | $supportFleet->getId(), |
||
| 33 | $supportFleet->getName(), |
||
| 34 | $supportFleet->getLeadShip()->getSectorString() |
||
| 35 | ); |
||
| 36 | |||
| 37 | $pirateReaction->react( |
||
| 38 | $supportFleet, |
||
| 39 | PirateReactionTriggerEnum::ON_SUPPORT_CALL |
||
| 40 | ); |
||
| 41 | |||
| 42 | return null; |
||
| 43 | } |
||
| 45 |