| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | final class JsonUtils |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Returns JSON string as an associative array representation. |
||
| 21 | * |
||
| 22 | * @throws InvalidContentTypeException |
||
| 23 | * |
||
| 24 | * @return array<mixed> |
||
| 25 | */ |
||
| 26 | public static function toArray(string $jsonAsString): array |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Converts array to a JSON representation in a string. |
||
| 39 | * |
||
| 40 | * @param array<mixed> $data |
||
| 41 | */ |
||
| 42 | public static function toString(array $data): string |
||
| 52 |