Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| JsonEncoder | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| encode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Serializer\Encoders; |
| 3 | |
| 4 | use Apie\Core\Lists\ItemHashmap; |
| 5 | use Apie\Core\Lists\ItemList; |
| 6 | use Apie\Serializer\Interfaces\EncoderInterface; |
| 7 | |
| 8 | class JsonEncoder implements EncoderInterface |
| 9 | { |
| 10 | public function encode(string|int|float|bool|array|null|ItemHashmap|ItemList $input): string |
| 11 | { |
| 12 | return json_encode($input, JSON_UNESCAPED_SLASHES); |
| 13 | } |
| 14 | } |