Skip to content

A little cleanup #409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Command/AnonConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class AnonConsumerCommand extends BaseConsumerCommand
{

protected function configure()
{
parent::configure();
Expand Down
7 changes: 4 additions & 3 deletions Command/BaseConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
throw new \InvalidArgumentException("The -m option should be null or greater than 0");
}
$this->initConsumer($input);

return $this->consumer->consume($this->amount);
}

protected function initConsumer($input) {

protected function initConsumer($input)
{
$this->consumer = $this->getContainer()
->get(sprintf($this->getConsumerService(), $input->getArgument('name')));

Expand Down
1 change: 0 additions & 1 deletion Command/ConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

class ConsumerCommand extends BaseConsumerCommand
{

protected function configure()
{
parent::configure();
Expand Down
6 changes: 3 additions & 3 deletions Command/DynamicConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DynamicConsumerCommand extends BaseConsumerCommand
protected function configure()
{
parent::configure();

$this
->setName('rabbitmq:dynamic-consumer')
->setDescription('Executes context-aware consumer')
Expand All @@ -29,10 +29,10 @@ protected function getConsumerService()
{
return 'old_sound_rabbit_mq.%s_dynamic';
}

protected function initConsumer($input)
{
parent::initConsumer($input);
$this->consumer->setContext($input->getArgument('context'));
}
}
}
3 changes: 1 addition & 2 deletions Command/MultipleConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

class MultipleConsumerCommand extends BaseConsumerCommand
{

protected function configure()
{
parent::configure();

$this->setDescription('Executes a consumer that uses multiple queues');
$this->setName('rabbitmq:multiple-consumer');
}
Expand Down
1 change: 0 additions & 1 deletion Command/RpcServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

class RpcServerCommand extends BaseRabbitMqCommand
{

protected function configure()
{
parent::configure();
Expand Down
1 change: 0 additions & 1 deletion Command/SetupFabricCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
define('AMQP_DEBUG', (bool) $input->getOption('debug'));
}


$output->writeln('Setting up the Rabbit MQ fabric');

$partsHolder = $this->getContainer()->get('old_sound_rabbit_mq.parts_holder');
Expand Down
3 changes: 1 addition & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;

/**
* Configuration
Expand Down Expand Up @@ -74,7 +74,6 @@ protected function addConnections(ArrayNodeDefinition $node)
;
}


protected function addProducers(ArrayNodeDefinition $node)
{
$node
Expand Down