Conditions | 3 |
Paths | 7 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 7 | public function execute(array $array): array |
|
31 | { |
||
32 | try { |
||
33 | 7 | $result = []; |
|
34 | 7 | foreach (\array_keys($array) as $key) { |
|
35 | 6 | $this->flattenValue($array[$key], $result); |
|
36 | } |
||
37 | |||
38 | 6 | return \array_values(\array_unique($result)); |
|
39 | 1 | } catch (\Throwable $t) { |
|
40 | 1 | throw new \RuntimeException($t->getMessage()); |
|
41 | } |
||
59 |