Skip to content
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

Command name is declared in normal way #22

Merged
merged 1 commit into from Jun 11, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Console/Command/ConsumerCommand.php
Expand Up @@ -17,12 +17,13 @@
final class ConsumerCommand extends AbstractConsumerCommand
{

public const COMMAND_NAME = 'rabbitmq:consumer';
/** @var string */
protected static $defaultName = 'rabbitmq:consumer';


protected function configure(): void
{
$this->setName(self::COMMAND_NAME);
$this->setName(static::$defaultName);
$this->setDescription('Run a RabbitMQ consumer');

$this->addArgument('consumerName', InputArgument::REQUIRED, 'Name of the consumer');
Expand Down
5 changes: 3 additions & 2 deletions src/Console/Command/DeclareQueuesAndExchangesCommand.php
Expand Up @@ -15,7 +15,8 @@
final class DeclareQueuesAndExchangesCommand extends Command
{

private const COMMAND_NAME = 'rabbitmq:declareQueuesAndExchanges';
/** @var string */
protected static $defaultName = 'rabbitmq:declareQueuesAndExchanges';

/**
* @var QueuesDataBag
Expand Down Expand Up @@ -45,7 +46,7 @@ public function __construct(
ExchangeDeclarator $exchangeDeclarator
)
{
parent::__construct(self::COMMAND_NAME);
parent::__construct(static::$defaultName);
$this->queuesDataBag = $queuesDataBag;
$this->exchangesDataBag = $exchangesDataBag;
$this->queueDeclarator = $queueDeclarator;
Expand Down
5 changes: 3 additions & 2 deletions src/Console/Command/StaticConsumerCommand.php
Expand Up @@ -17,12 +17,13 @@
final class StaticConsumerCommand extends AbstractConsumerCommand
{

public const COMMAND_NAME = 'rabbitmq:staticConsumer';
/** @var string */
protected static $defaultName = 'rabbitmq:staticConsumer';


protected function configure(): void
{
$this->setName(self::COMMAND_NAME);
$this->setName(static::$defaultName);
$this->setDescription('Run a RabbitMQ consumer but consume just particular amount of messages');

$this->addArgument('consumerName', InputArgument::REQUIRED, 'Name of the consumer');
Expand Down