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