MultipleConsumerCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 54.55%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 21
ccs 6
cts 11
cp 0.5455
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getConsumerService() 0 3 1
A configure() 0 7 1
A initConsumer() 0 4 1
1
<?php
2
3
namespace OldSound\RabbitMqBundle\Command;
4
5
use Symfony\Component\Console\Input\InputArgument;
6
7
class MultipleConsumerCommand extends BaseConsumerCommand
8
{
9 1
    protected function configure()
10
    {
11 1
        parent::configure();
12
13 1
        $this->setDescription('Executes a consumer that uses multiple queues')
14 1
                ->setName('rabbitmq:multiple-consumer')
15 1
                ->addArgument('context', InputArgument::OPTIONAL, 'Context the consumer runs in')
16
        ;
17 1
    }
18
19
    protected function getConsumerService()
20
    {
21
        return 'old_sound_rabbit_mq.%s_multiple';
22
    }
23
24
    protected function initConsumer($input)
25
    {
26
        parent::initConsumer($input);
27
        $this->consumer->setContext($input->getArgument('context'));
28
    }
29
}