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