| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class AuthorizationService |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param UserRolesRepository $userRolesRepository |
||
| 13 | */ |
||
| 14 | 4 | public function __construct(private UserRolesRepository $userRolesRepository) |
|
| 15 | { |
||
| 16 | 4 | } |
|
| 17 | |||
| 18 | /** |
||
| 19 | * @param int $userId |
||
| 20 | * @param array $allowedRoles |
||
| 21 | * @return bool |
||
| 22 | */ |
||
| 23 | 4 | public function isUserRoleAuthorized(int $userId, array $allowedRoles): bool |
|
| 31 | } |
||
| 32 | } |
||
| 34 |