Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function createValue(string $json, ?PathInterface $path = null): NodeValueInterface |
||
30 | { |
||
31 | try { |
||
32 | $decodedData = json_decode($json, false, 512, JSON_THROW_ON_ERROR); |
||
33 | } catch (Throwable $e) { |
||
34 | throw new Exception\JsonDecodingFailedException($json, $e); |
||
35 | } |
||
36 | |||
37 | return $this |
||
38 | ->decodedJsonNodeValueFactory |
||
39 | ->createValue($decodedData, $path); |
||
40 | } |
||
42 |