| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function handle(SimpleXMLElement $xml) |
||
| 15 | { |
||
| 16 | $response = new stdClass; |
||
| 17 | |||
| 18 | foreach ($xml->children() as $child) { |
||
| 19 | |||
| 20 | $name = $child->getName(); |
||
| 21 | |||
| 22 | if (in_array($name, self::STRINGS)) { |
||
| 23 | $response->$name = (string) $child; |
||
| 24 | } else { |
||
| 25 | $response->$name[ ] = $this->processChild($name, $child); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | return $response; |
||
| 30 | } |
||
| 31 | |||
| 41 |