MultipleConsumerCommand::initConsumer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
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
}