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