| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | 2 | protected function composeXML($data, &$xml) |
|
| 46 | { |
||
| 47 | 2 | foreach ($data as $key => $value) { |
|
| 48 | 2 | if (is_array($value)) { |
|
| 49 | 1 | if (is_numeric($key)) { |
|
| 50 | 1 | $key = 'item'.$key; |
|
| 51 | 1 | } |
|
| 52 | |||
| 53 | 1 | $subnode = $xml->addChild($key); |
|
| 54 | 1 | $this->composeXML($value, $subnode); |
|
| 55 | 1 | } else { |
|
| 56 | 2 | $xml->addChild("$key", htmlspecialchars("$value")); |
|
| 57 | } |
||
| 58 | 2 | } |
|
| 59 | 2 | } |
|
| 60 | } |
||
| 61 |