| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | final class Json |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Encode a value as json. |
||
| 22 | * |
||
| 23 | * @param mixed $value |
||
| 24 | * |
||
| 25 | * @throws \Gnumoksha\FreeIpa\Infra\Json\JsonException |
||
| 26 | * @see \json_encode() |
||
| 27 | */ |
||
| 28 | public static function encode($value, int $options = 0, int $depth = 512): string |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Decode a value from json. |
||
| 41 | * |
||
| 42 | * @return mixed[]|\stdClass |
||
| 43 | * @throws \Gnumoksha\FreeIpa\Infra\Json\JsonException |
||
| 44 | * @see \json_decode() |
||
| 45 | */ |
||
| 46 | public static function decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) |
||
| 57 |