Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 3 | public function targetHasPositivePrestige(ShipInterface $target): bool |
|
29 | { |
||
30 | 3 | $fleet = $target->getFleet(); |
|
31 | 3 | if ($fleet !== null) { |
|
32 | 1 | foreach ($fleet->getShips() as $ship) { |
|
33 | 1 | if ($ship->getRump()->getPrestige() > 0) { |
|
34 | 1 | return true; |
|
35 | } |
||
36 | } |
||
37 | } |
||
38 | |||
39 | 2 | return $target->getRump()->getPrestige() > 0; |
|
40 | } |
||
52 |