| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 54 | 7 | public static function decode(string $json, bool $assoc = true, int $depth = 512) |
|
| 55 | { |
||
| 56 | 7 | $data = \json_decode($json, $assoc, $depth, \JSON_BIGINT_AS_STRING); |
|
| 57 | |||
| 58 | 7 | if (JSON_ERROR_NONE !== $error = \json_last_error()) { |
|
| 59 | throw new JsonException(\json_last_error_msg(), $error); |
||
| 60 | } |
||
| 61 | |||
| 62 | 7 | return $data; |
|
| 63 | } |
||
| 65 |