Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php |
||
10 | 7 | protected function parse($path) |
|
11 | { |
||
12 | 7 | $entries = json_decode(file_get_contents($path), true); |
|
13 | |||
14 | 7 | if (json_last_error() !== JSON_ERROR_NONE) { |
|
15 | throw new \Exception("Failed to parse json manifest file ($path): ".json_last_error_msg()); |
||
16 | } |
||
17 | |||
18 | 7 | return $entries; |
|
19 | } |
||
20 | } |
||
21 |