Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 4 | public function process(ContainerBuilder $container) |
|
27 | { |
||
28 | 4 | if (!$container->hasDefinition('twig')) { |
|
29 | 1 | $container->removeDefinition(RoutingExtension::class); |
|
30 | 1 | $container->removeDefinition(RoutingRuntime::class); |
|
31 | |||
32 | 1 | return; |
|
33 | } |
||
34 | |||
35 | 3 | if (!$container->hasDefinition('twig.extension.routing')) { |
|
36 | 1 | $definition = $container->getDefinition(RoutingExtension::class); |
|
37 | 1 | $options = $definition->getArgument(0); |
|
38 | 1 | $options['discover_routing_functions'] = false; |
|
39 | 1 | $definition->replaceArgument(0, $options); |
|
40 | } |
||
43 |