Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public static function encode($data, int $options = 0, int $depth = 512): string |
||
34 | { |
||
35 | // Encode and convert encoding errors to exceptions |
||
36 | $json = parent::encode($data); |
||
37 | |||
38 | // Filter out unwanted Unicode characters from the encoded JSON |
||
39 | return strtr($json, self::$unwantedJsonUnicodeCharacters); |
||
40 | } |
||
43 |