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