| Conditions | 7 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 9 | public function getAlertedShipsOnLocation(ShipInterface $incomingShip): Collection |
|
| 17 | { |
||
| 18 | 9 | return $incomingShip->getCurrentMapField()->getShips() |
|
| 19 | 9 | ->filter( |
|
| 20 | 9 | fn (ShipInterface $ship) => !$ship->getUser()->isVacationRequestOldEnough() |
|
| 21 | 8 | && $ship->getUser() !== $incomingShip->getUser() |
|
| 22 | 8 | && ($ship->isFleetLeader() || $ship->getFleet() === null) |
|
| 23 | 8 | && !$ship->isAlertGreen() |
|
| 24 | 8 | && !$ship->isWarped() |
|
| 25 | 8 | && !$ship->getCloakState() |
|
| 26 | 9 | ) |
|
| 27 | 9 | ->map(fn (ShipInterface $ship) => $this->shipWrapperFactory->wrapShip($ship)); |
|
| 28 | } |
||
| 30 |