Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function exportValue(ValueInterface $value): string |
||
27 | { |
||
28 | $decodedValue = $this |
||
29 | ->decoder |
||
30 | ->exportValue($value); |
||
31 | try { |
||
32 | return json_encode( |
||
33 | $decodedValue, |
||
34 | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR |
||
35 | ); |
||
36 | } catch (Throwable $e) { |
||
37 | throw new Exception\EncodingFailedException($decodedValue, $e); |
||
38 | } |
||
41 |