| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public static function encode($value, $options = 0, $depth = 512) |
||
| 25 | { |
||
| 26 | $json = \json_encode($value, $options, $depth); |
||
| 27 | if (JSON_ERROR_NONE !== json_last_error()) { |
||
| 28 | throw new JsonParseException( |
||
| 29 | 'json_encode error: ' . json_last_error_msg(), |
||
| 30 | json_last_error() |
||
| 31 | ); |
||
| 32 | } |
||
| 33 | |||
| 34 | return $json; |
||
| 35 | } |
||
| 61 |