Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
17 | 1 | public static function create(): SerializerInterface |
|
18 | { |
||
19 | 1 | $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader())); |
|
20 | 1 | $normalizer = new ObjectNormalizer($classMetadataFactory); |
|
21 | 1 | $encoder = new JsonEncoder(); |
|
22 | |||
23 | 1 | $symfonySerializer = new Serializer([$normalizer], [$encoder]); |
|
24 | |||
25 | 1 | return new SymfonySerializerAdapter($symfonySerializer); |
|
26 | } |
||
27 | } |
||
28 |