Conditions | 5 |
Paths | 9 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
66 | public function getAllAvailableRoles($roleHierarchy) |
||
67 | { |
||
68 | $roles = []; |
||
69 | foreach ($roleHierarchy as $key => $value) { |
||
70 | if (is_array($value)) { |
||
71 | $roles = array_merge($roles, $this->getAllAvailableRoles($value)); |
||
72 | } |
||
73 | if (is_string($key)) { |
||
74 | $roles[] = $key; |
||
75 | } |
||
76 | if (is_string($value)) { |
||
77 | $roles[] = $value; |
||
78 | } |
||
79 | } |
||
80 | |||
81 | return $roles; |
||
82 | } |
||
83 | } |
||
84 |