Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function read($filename) |
||
25 | { |
||
26 | Assertion::file($filename); |
||
27 | |||
28 | $this->filename = $filename; |
||
29 | |||
30 | $config = json_decode(file_get_contents($filename), true); |
||
31 | |||
32 | if (json_last_error() !== JSON_ERROR_NONE) { |
||
33 | throw InvalidConfigException::fromJSONFileError($filename, $this->getJsonError()); |
||
34 | } |
||
35 | |||
36 | return $config; |
||
37 | } |
||
38 | |||
51 |