| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.7462 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 13 | 3 | protected function getTargetWrapper( |
|
| 14 | SpacecraftWrapperInterface|int $target, |
||
| 15 | bool $allowUplink, |
||
| 16 | SpacecraftLoaderInterface $spacecraftLoader, |
||
| 17 | GameControllerInterface $game |
||
| 18 | ): SpacecraftWrapperInterface { |
||
| 19 | 3 | if ($target instanceof SpacecraftWrapperInterface) { |
|
| 20 | 3 | return $target; |
|
| 21 | } |
||
| 22 | |||
| 23 | return $spacecraftLoader->getWrapperByIdAndUser( |
||
| 24 | $target, |
||
| 25 | $game->getUser()->getId(), |
||
| 26 | $allowUplink |
||
| 27 | ); |
||
| 30 |