| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | private function getArrayItems($items) |
||
| 25 | { |
||
| 26 | $returnedArray = array(); |
||
| 27 | $iteration = 0; |
||
| 28 | foreach ($items as $item) { |
||
| 29 | $returnedArray[$iteration] = $item->getAsArray(); |
||
| 30 | if ($item->hasChildren() === true) { |
||
| 31 | $returnedArray[$iteration]['children'] = $this->getArrayItems($item->getChildren()); |
||
| 32 | } else { |
||
| 33 | $returnedArray[$iteration]['children'] = array(); |
||
| 34 | } |
||
| 35 | $iteration++; |
||
| 36 | } |
||
| 37 | return $returnedArray; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |