| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | function json_decode(string $json, int $depth = 512, int $options = 0): array |
||
| 53 | { |
||
| 54 | $data = spl_json_decode($json, true, $depth, $options); |
||
| 55 | if (JSON_ERROR_NONE !== json_last_error()) { |
||
| 56 | throw new Exception\InvalidArgumentException(sprintf('Error decoding JSON: %s', json_last_error_msg())); |
||
| 57 | } |
||
| 58 | |||
| 59 | return $data; |
||
| 60 | } |
||
| 61 |