Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function __invoke(): SerializerInterface |
||
16 | { |
||
17 | try { |
||
18 | return Serializer\SerializerBuilder::create() |
||
19 | ->setPropertyNamingStrategy( |
||
20 | new Serializer\Naming\SerializedNameAnnotationStrategy( |
||
21 | new Serializer\Naming\IdenticalPropertyNamingStrategy() |
||
22 | ) |
||
23 | ) |
||
24 | ->setSerializationContextFactory(function () { |
||
25 | return SerializationContext::create() |
||
26 | ->setSerializeNull(true); |
||
27 | }) |
||
28 | ->build() |
||
29 | ; |
||
30 | // @codeCoverageIgnoreStart |
||
31 | } catch (\Throwable $e) { |
||
32 | throw new ServiceNotCreatedException(); |
||
33 | } |
||
37 |