| Conditions | 7 |
| Paths | 7 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 56 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 18 | public function process(ContainerBuilder $container) |
||
| 19 | { |
||
| 20 | if (false === $container->hasDefinition('query_filter_bundle.query.proxy_query_builder_manager')) { |
||
| 21 | return; |
||
| 22 | } |
||
| 23 | |||
| 24 | $definition = $container->getDefinition('query_filter_bundle.query.proxy_query_builder_manager'); |
||
| 25 | $disabled = $container->getParameter('query_filter_bundle.disabled_conditions'); |
||
| 26 | $container->getParameterBag()->remove('query_filter_bundle.disabled_conditions'); |
||
| 27 | |||
| 28 | foreach ($container->findTaggedServiceIds('proxy_query_builder.condition') as $id => $converters) { |
||
| 29 | foreach ($converters as $converter) { |
||
| 30 | $name = isset($converter['condition']) ? $converter['condition'] : null; |
||
| 31 | |||
| 32 | if (null !== $name && in_array($name, $disabled)) { |
||
| 33 | continue; |
||
| 34 | } |
||
| 35 | |||
| 36 | $definition->addMethodCall('registerCondition', [new Reference($id)]); |
||
| 37 | } |
||
| 40 | } |