| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | final class UserAccessLoader implements IUserAccessLoader |
||
| 17 | { |
||
| 18 | public function loadRolesForUser(User $user): array |
||
| 19 | { |
||
| 20 | $domain = Domain::getCurrent($user->getDatabase()); |
||
| 21 | $userRoles = UserRole::getForUser($user->getId(), $user->getDatabase(), $domain->getId()); |
||
| 22 | |||
| 23 | return array_map(fn(UserRole $r): string => $r->getRole(), $userRoles); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function loadDomainsForUser(User $user): array |
||
| 50 | } |
||
| 51 | } |