Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
4113 | 43 | public static function json_decode( |
|
4114 | string $json, |
||
4115 | bool $assoc = false, |
||
4116 | int $depth = 512, |
||
4117 | int $options = 0 |
||
4118 | ) { |
||
4119 | 43 | $json = self::filter($json); |
|
4120 | |||
4121 | 43 | if (self::$SUPPORT['json'] === false) { |
|
4122 | throw new \RuntimeException('ext-json: is not installed'); |
||
4123 | } |
||
4124 | |||
4125 | 43 | if ($depth < 1) { |
|
4126 | $depth = 1; |
||
4127 | } |
||
4128 | |||
4129 | 43 | return \json_decode($json, $assoc, $depth, $options); |
|
4130 | } |
||
13694 |