| 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 |
||
| 24 | 27 | public function __invoke(): SerializerInterface |
|
| 25 | { |
||
| 26 | try { |
||
| 27 | 27 | return Serializer\SerializerBuilder::create() |
|
| 28 | 27 | ->setPropertyNamingStrategy( |
|
| 29 | 27 | new Serializer\Naming\SerializedNameAnnotationStrategy( |
|
| 30 | 27 | new Serializer\Naming\IdenticalPropertyNamingStrategy() |
|
| 31 | 27 | ) |
|
| 32 | 27 | ) |
|
| 33 | 27 | ->setSerializationContextFactory(function () { |
|
| 34 | 8 | return SerializationContext::create() |
|
| 35 | 8 | ->setSerializeNull(true); |
|
| 36 | 27 | }) |
|
| 37 | 27 | ->build() |
|
| 38 | 27 | ; |
|
| 39 | // @codeCoverageIgnoreStart |
||
| 40 | } catch (\Throwable $e) { |
||
| 41 | throw new ServiceNotCreatedException(); |
||
| 42 | } |
||
| 46 |