Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
41 | 54 | public function decode($schema) |
|
42 | { |
||
43 | 54 | $data = json_decode($schema, $this->assoc, $this->depth, $this->options); |
|
44 | |||
45 | 54 | if (json_last_error() !== JSON_ERROR_NONE) { |
|
46 | 2 | throw new DecodingException(sprintf('Invalid JSON: %s', json_last_error_msg())); |
|
47 | } |
||
48 | |||
49 | 52 | return $data; |
|
50 | } |
||
51 | } |
||
52 |