| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class EnumAccessChecker |
||
| 14 | { |
||
| 15 | private AccessCheckerInterface $accessChecker; |
||
| 16 | |||
| 17 | public function __construct(AccessCheckerInterface $accessChecker) |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Checks if the user with the ID given has the specified permission. |
||
| 24 | * |
||
| 25 | * @param int|string|null $userId The user ID representing the unique identifier of a user. If ID is `null`, |
||
| 26 | * it means user is a guest. |
||
| 27 | * @param BackedEnum $permission The permission enumeration instance to be checked against. |
||
| 28 | * @param array $parameters Name-value pairs that will be used to determine if access is granted. |
||
| 29 | * |
||
| 30 | * @throws InvalidArgumentException If any of argument is not of the expected type or does not refer to |
||
| 31 | * an existing value. |
||
| 32 | * |
||
| 33 | * @return bool Whether the user has the specified permission. |
||
| 34 | */ |
||
| 35 | public function userHasPermission(int|string|null $userId, BackedEnum $permission, array $parameters = []): bool |
||
| 40 |
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