| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function handle(GameControllerInterface $game): void |
||
| 30 | { |
||
| 31 | $contact = $this->contactRepository->find($this->showContactModeSwitchRequest->getContactId()); |
||
| 32 | |||
| 33 | if ($contact === null || $contact->getUserId() !== $game->getUser()->getId()) { |
||
| 34 | return; |
||
| 35 | } |
||
| 36 | |||
| 37 | $game->setPageTitle(_('Status')); |
||
| 38 | $game->setMacroInAjaxWindow('html/user/contactModeSwitch.twig'); |
||
| 39 | $game->setTemplateVar('contact', $contact); |
||
| 40 | $game->setTemplateVar('CONTACT_LIST_MODES', ContactListModeEnum::cases()); |
||
| 41 | } |
||
| 43 |