| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 2 | public function initMembers(): Collection |
|
| 18 | { |
||
| 19 | 2 | $fleet = $this->leader->getFleetWrapper(); |
|
| 20 | |||
| 21 | 2 | if ($fleet === null) { |
|
| 22 | 1 | return $this->createSingleton($this->leader); |
|
| 23 | } else { |
||
| 24 | |||
| 25 | // only uncloaked ships enter fight |
||
| 26 | 1 | return $fleet->getShipWrappers() |
|
| 27 | 1 | ->filter(fn (ShipWrapperInterface $wrapper) => !$wrapper->get()->getCloakState()); |
|
| 28 | } |
||
| 41 |