Conditions | 4 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
35 | private function recursive($data, $level) { |
||
36 | $list = []; |
||
37 | if(is_array($data)) { |
||
38 | foreach ($data as $key => $value) { |
||
39 | if(is_array($value)) { |
||
40 | $list[] = ArrayData::create(['Key' => $key, 'Value' => '', 'Heading' => true, 'Level' => $level]); |
||
41 | $list = array_merge($list, $this->recursive($value, $level+1)); |
||
42 | } else { |
||
43 | $list[] = ArrayData::create(['Key' => $key, 'Value' => $value, 'Level' => $level]); |
||
44 | } |
||
45 | } |
||
46 | } |
||
47 | return $list; |
||
48 | } |
||
49 | |||
60 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.