| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 4 | public function initMembers(): Collection |
|
| 20 | { |
||
| 21 | 4 | if ($this->wrapper instanceof FleetWrapperInterface) { |
|
| 22 | 1 | return $this->wrapper->getShipWrappers(); |
|
| 23 | } |
||
| 24 | |||
| 25 | 3 | $ship = $this->wrapper->get(); |
|
| 26 | 3 | $fleetWrapper = $this->wrapper->getFleetWrapper(); |
|
| 27 | |||
| 28 | 3 | if ($ship->isFleetLeader() && $fleetWrapper !== null) { |
|
| 29 | 1 | return $fleetWrapper->getShipWrappers(); |
|
| 30 | } else { |
||
| 31 | 2 | return $this->createSingleton($this->wrapper); |
|
| 32 | } |
||
| 35 |