| Total Complexity | 4 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 24 | class Json |
||
| 25 | { |
||
| 26 | public static function encode($string) |
||
| 27 | { |
||
| 28 | $json = json_encode($string); |
||
| 29 | if (JSON_ERROR_NONE === json_last_error()) { |
||
| 30 | return $json; |
||
| 31 | } |
||
| 32 | |||
| 33 | return null; |
||
| 34 | } |
||
| 35 | |||
| 36 | // ------------------------------------------------------------------------ |
||
| 37 | |||
| 38 | public static function decode($string) |
||
| 46 | } |
||
| 47 | } |