| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | private function getModuleView(GameControllerInterface $game): ModuleViewEnum |
||
| 34 | { |
||
| 35 | $moduleView = null; |
||
| 36 | if (request::has('view')) { |
||
| 37 | $moduleView = ModuleViewEnum::tryFrom(request::getStringFatal('view')); |
||
| 38 | } |
||
| 39 | |||
| 40 | if ($moduleView !== null) { |
||
| 41 | return $moduleView; |
||
| 42 | } |
||
| 43 | |||
| 44 | return $game->getViewContext(ViewContextTypeEnum::MODULE_VIEW) ?? $game->getUser()->getDefaultView(); |
||
| 45 | } |
||
| 47 |