| Conditions | 2 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | protected function parseResponse($xml) |
||
| 16 | { |
||
| 17 | $toArray = json_decode(json_encode($xml), true); |
||
| 18 | $output = []; |
||
| 19 | |||
| 20 | array_walk_recursive($toArray, function ($item, $key) use (&$output) { |
||
| 21 | $key = $this->replaceKey($key); |
||
| 22 | $output[$key] = (is_numeric($item))? floatval($item): $item; |
||
| 23 | }); |
||
| 24 | |||
| 25 | |||
| 26 | return $output; |
||
| 27 | } |
||
| 28 | |||
| 38 |