Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
19 | public function process(ContainerBuilder $container) |
||
20 | { |
||
21 | if (!$container->hasDefinition('serializer.mapping.cache_warmer')) { |
||
22 | return; |
||
23 | }; |
||
24 | |||
25 | $definition = $container->getDefinition('serializer.mapping.cache_warmer'); |
||
26 | $argument = $definition->getArgument(0); |
||
27 | /** @var Definition $argumentDefinition */ |
||
28 | foreach ($argument as $argumentDefinition) { |
||
29 | if (AnnotationLoader::class === $argumentDefinition->getClass()) { |
||
30 | $argument[] = new Reference(FakeSerializerLoader::class); |
||
31 | $definition->replaceArgument(0, $argument); |
||
32 | |||
33 | return; |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 |