| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | #[Override] |
||
| 28 | public function handle(GameControllerInterface $game): void |
||
| 29 | { |
||
| 30 | $userId = $game->getUser()->getId(); |
||
| 31 | |||
| 32 | $spacecraft = $this->spaceCraftLoader->getByIdAndUser(request::getIntFatal('id'), $userId); |
||
| 33 | |||
| 34 | if (!$game->getUser()->isNpc()) { |
||
| 35 | return; |
||
| 36 | } |
||
| 37 | |||
| 38 | $game->setPageTitle(_('Müllverbrennung')); |
||
| 39 | if ($game->getViewContext(ViewContextTypeEnum::NO_AJAX) === true) { |
||
| 40 | $game->showMacro('html/spacecraft/waste.twig'); |
||
| 41 | } else { |
||
| 42 | $game->setMacroInAjaxWindow('html/spacecraft/waste.twig'); |
||
| 43 | } |
||
| 44 | |||
| 45 | $game->setTemplateVar('SPACECRAFT', $spacecraft); |
||
| 46 | } |
||
| 47 | } |