| Conditions | 4 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function process(ContainerBuilder $container) |
||
| 16 | { |
||
| 17 | foreach ($container->getServiceIds() as $serviceId) { |
||
| 18 | $definition = $container->findDefinition($serviceId); |
||
| 19 | $class = $definition->getClass(); |
||
| 20 | if (is_a($class, 'Symfony\Component\DependencyInjection\ContainerAwareInterface', true)) { |
||
| 21 | if (!$definition->hasMethodCall('setContainer')) { |
||
| 22 | $definition->addMethodCall('setContainer', array(new Reference('service_container'))); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 |