| Conditions | 5 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5.2742 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 1 | #[Override] |
|
| 36 | public function isFeatureGranted(int $userId, AccessGrantedFeatureEnum $feature): bool |
||
| 37 | { |
||
| 38 | 1 | if (Init::getContainer()->get(GameControllerInterface::class)->isAdmin()) { |
|
| 39 | return true; |
||
| 40 | } |
||
| 41 | |||
| 42 | 1 | $grantedFeatures = $this->stuConfig->getGameSettings()->getGrantedFeatures(); |
|
| 43 | 1 | foreach ($grantedFeatures as $entry) { |
|
| 44 | if ( |
||
| 45 | 1 | $entry['feature'] === $feature->name |
|
| 46 | 1 | && in_array($userId, $entry['userIds']) |
|
| 47 | ) { |
||
| 48 | return true; |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 52 | 1 | return false; |
|
| 53 | } |
||
| 55 |
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