Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function build(): array |
||
31 | { |
||
32 | $roles = $this->securityRolesRepository->fetchAll(); |
||
33 | $roleDictionary = $this->createRoleDictionary($roles); |
||
34 | $hierarchyEntries = $this->securityRoleHierarchyRepository->fetchAll(); |
||
35 | |||
36 | $result = []; |
||
37 | |||
38 | /** @var SecurityRoleHierarchyEntity $hierarchyEntry */ |
||
39 | foreach ($hierarchyEntries as $hierarchyEntry) { |
||
40 | $role = $roleDictionary[$hierarchyEntry->roleId]; |
||
41 | $subRole = $roleDictionary[$hierarchyEntry->subRoleId]; |
||
42 | |||
43 | $result[$role][] = $subRole; |
||
44 | } |
||
45 | |||
46 | return $result; |
||
47 | } |
||
48 | |||
61 |