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