Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 6 | public function parse($path) |
|
29 | { |
||
30 | 6 | $data = null; |
|
31 | |||
32 | try { |
||
33 | 6 | $data = NeonParser::decode(file_get_contents(realpath($path))); |
|
34 | 5 | } catch (\Exception $ex) { |
|
35 | 3 | throw new ParseException([ |
|
36 | 3 | 'message' => 'Error parsing NEON file', |
|
37 | 3 | 'file' => $path, |
|
38 | 3 | 'exception' => $ex, |
|
39 | 2 | ]); |
|
40 | 2 | } |
|
41 | |||
42 | 3 | return $data; |
|
43 | } |
||
44 | |||
55 |