| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class JsonEncoder implements Encoder |
||
| 18 | { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param array|int|string|float|bool $scalar |
||
| 22 | * @param string $format |
||
| 23 | * @param array $context |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | 3 | public function encode($scalar, string $format, array $context = []) { |
|
| 27 | 3 | return \json_encode($scalar); |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $data |
||
| 32 | * @param string $format |
||
| 33 | * @param array $context |
||
| 34 | * @return array|bool|float|int|string |
||
| 35 | */ |
||
| 36 | 3 | public function decode(string $data, string $format, array $context = []) { |
|
| 38 | } |
||
| 39 | |||
| 40 | 1 | public function canProcess(string $format): bool { |
|
| 42 | } |
||
| 43 | } |
||
| 44 |