| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 4 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 14 | class SymfonySerializer implements SerializerInterface |
||
| 15 | { |
||
| 16 | /** @var Serializer */ |
||
| 17 | private Serializer $serializer; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * SymfonySerializer constructor. |
||
| 21 | */ |
||
| 22 | 1 | public function __construct() |
|
| 23 | { |
||
| 24 | 1 | $this->serializer = new Serializer([], [new JsonEncoder()]); |
|
| 25 | 1 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritDoc |
||
| 29 | */ |
||
| 30 | 1 | public function serialize($data): string |
|
| 31 | { |
||
| 32 | 1 | return $this->serializer->encode($data, JsonEncoder::FORMAT); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @inheritDoc |
||
| 37 | */ |
||
| 38 | 1 | public function deserialize(string $data) |
|
| 41 | } |
||
| 42 | } |
||
| 43 |