| Conditions | 5 |
| Paths | 5 |
| Total Lines | 26 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 9 | #[Override] |
|
| 17 | public function checkUserAccess( |
||
| 18 | ControllerInterface $controller, |
||
| 19 | GameControllerInterface $game |
||
| 20 | ): bool { |
||
| 21 | |||
| 22 | 9 | if ($controller instanceof NoAccessCheckControllerInterface) { |
|
| 23 | 1 | return true; |
|
| 24 | } |
||
| 25 | |||
| 26 | 8 | if ($game->getUser()->getState() === UserEnum::USER_STATE_ACCOUNT_VERIFICATION) { |
|
| 27 | 1 | throw new AccountNotVerifiedException(); |
|
| 28 | } |
||
| 29 | |||
| 30 | 7 | if (!$controller instanceof AccessCheckControllerInterface) { |
|
| 31 | 1 | return true; |
|
| 32 | } |
||
| 33 | |||
| 34 | 6 | $feature = $controller->getFeatureIdentifier(); |
|
| 35 | 6 | if ($this->isFeatureGranted($game->getUser()->getId(), $feature, $game)) { |
|
| 36 | 2 | return true; |
|
| 37 | } |
||
| 38 | |||
| 39 | 4 | $game->addInformation('[b][color=#ff2626]Aktion nicht möglich, Spieler ist nicht berechtigt![/color][/b]'); |
|
| 40 | |||
| 41 | 4 | return false; |
|
| 42 | } |
||
| 64 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths