| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function process(ContainerBuilder $container) |
||
| 13 | { |
||
| 14 | if ($container->hasParameter('dtc_queue.beanstalkd.host')) { |
||
| 15 | $definition = new Definition( |
||
| 16 | 'Pheanstalk\\Pheanstalk', |
||
| 17 | [$container->getParameter('dtc_queue.beanstalkd.host')] |
||
| 18 | ); |
||
| 19 | $container->setDefinition('dtc_queue.beanstalkd', $definition); |
||
| 20 | $definition = $container->getDefinition('dtc_queue.job_manager.beanstalkd'); |
||
| 21 | $definition->addMethodCall('setBeanstalkd', [new Reference('dtc_queue.beanstalkd')]); |
||
| 22 | if ($container->hasParameter('dtc_queue.beanstalkd.tube')) { |
||
| 23 | $definition->addMethodCall('setTube', [$container->getParameter('dtc_queue.beanstalkd.tube')]); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 |