| Conditions | 3 |
| Paths | 5 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 22 | public function get(): array |
|
| 28 | { |
||
| 29 | try { |
||
| 30 | 22 | $groups = $this->lib->readGroup(); |
|
| 31 | /** @var array<string, array<int, string>> $result */ |
||
| 32 | 21 | $result = []; |
|
| 33 | 21 | foreach ($groups as $group) { |
|
| 34 | 21 | $result[$group->getGroupId()] = $group->getGroupParents(); |
|
| 35 | } |
||
| 36 | 21 | return $result; |
|
| 37 | 1 | } catch (AccountsException $ex) { |
|
| 38 | 1 | throw new GroupsException($ex->getMessage(), $ex->getCode(), $ex); |
|
| 39 | } |
||
| 42 |