| Conditions | 5 |
| Paths | 8 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 22 | { |
||
| 23 | if (defined('AMQP_DEBUG') === false) { |
||
| 24 | define('AMQP_DEBUG', (bool) $input->getOption('debug')); |
||
| 25 | } |
||
| 26 | |||
| 27 | $output->writeln('Setting up the Rabbit MQ fabric'); |
||
| 28 | |||
| 29 | $partsHolder = $this->getContainer()->get('old_sound_rabbit_mq.parts_holder'); |
||
| 30 | |||
| 31 | foreach (array('base_amqp', 'binding') as $key) { |
||
| 32 | foreach ($partsHolder->getParts('old_sound_rabbit_mq.' . $key) as $baseAmqp) { |
||
| 33 | if ($baseAmqp instanceof DynamicConsumer) { |
||
| 34 | continue; |
||
| 35 | } |
||
| 36 | $baseAmqp->setupFabric(); |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | return 0; |
||
| 41 | |||
| 44 |