Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 39 | public function __invoke(): SerializerInterface |
|
23 | { |
||
24 | try { |
||
25 | 39 | return Serializer\SerializerBuilder::create() |
|
26 | 39 | ->setPropertyNamingStrategy( |
|
27 | 39 | new Serializer\Naming\SerializedNameAnnotationStrategy( |
|
28 | 39 | new Serializer\Naming\IdenticalPropertyNamingStrategy() |
|
29 | 39 | ) |
|
30 | 39 | ) |
|
31 | 39 | ->setSerializationContextFactory(function () { |
|
32 | 8 | return SerializationContext::create() |
|
33 | 8 | ->setSerializeNull(true); |
|
34 | 39 | }) |
|
35 | 39 | ->build() |
|
36 | 39 | ; |
|
37 | // @codeCoverageIgnoreStart |
||
38 | } catch (\Throwable $e) { |
||
39 | throw new ServiceNotCreatedException(); |
||
40 | } |
||
44 |