| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 32 | $data = @simplexml_load_file($path); |
||
| 33 | return $data ? @json_decode(json_encode($data), true) : false; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritDoc} |
||
| 38 | */ |
||
| 39 | protected static function getError(/*# string */ $path)/*#: string */ |
||
| 40 | { |
||
| 41 | libxml_use_internal_errors(true); |
||
| 42 | simplexml_load_file($path, null, \LIBXML_NOERROR); |
||
| 43 | return libxml_get_errors()[0]->message; |
||
| 44 | } |
||
| 45 | } |
||
| 46 |