| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | protected function readFromFile($path) |
||
| 25 | { |
||
| 26 | try { |
||
| 27 | $data = \json_decode(\file_get_contents($path), TRUE); |
||
| 28 | if ($data === NULL) { |
||
| 29 | throw new \RuntimeException(\json_last_error_msg()); |
||
| 30 | } |
||
| 31 | } catch (\Exception $e) { |
||
| 32 | throw new \RuntimeException($e->getMessage()); |
||
| 33 | } |
||
| 34 | return $data; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |