| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public static function decode($json, $assoc = false, $depth = 512, $options = 0) |
||
| 49 | { |
||
| 50 | $data = \json_decode($json, $assoc, $depth, $options); |
||
| 51 | if (JSON_ERROR_NONE !== json_last_error()) { |
||
| 52 | throw new JsonParseException( |
||
| 53 | 'json_decode error: ' . json_last_error_msg(), |
||
| 54 | json_last_error() |
||
| 55 | ); |
||
| 56 | } |
||
| 57 | |||
| 58 | return $data; |
||
| 59 | } |
||
| 61 |