Skip to content

Commit

Permalink
CS, PHPStan, Review hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Spamercz committed May 28, 2021
1 parent 2871130 commit 0b82c34
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 19 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4

addons:
apt:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"phpstan/phpstan-shim": "^0.11.4",
"kdyby/coding-standard": "dev-master",
"php-coveralls/php-coveralls": "^2.1",
"nette/tester": "~2.2",
"mockery/mockery": "~0.9.11",
"nette/tester": "^2.3.2",
"mockery/mockery": "~1.3.0",
"jakub-onderka/php-parallel-lint": "^1.0",
"typo3/class-alias-loader": "^1.0",
"nette/caching": "^3.0"
Expand Down
2 changes: 1 addition & 1 deletion src/Kdyby/RabbitMq/AmqpMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected function queueDeclare(): void
*/
protected function doQueueDeclare(string $name, array $options): void
{
[$queueName ] = $this->getChannel()->queue_declare(
[$queueName] = $this->getChannel()->queue_declare(
$name,
$options['passive'],
$options['durable'],
Expand Down
8 changes: 1 addition & 7 deletions src/Kdyby/RabbitMq/Command/BaseConsumerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ protected function configure(): void
}

/**
* @param \Symfony\Component\Console\Input\InputInterface $input An InputInterface instance
* @param \Symfony\Component\Console\Output\OutputInterface $output An OutputInterface instance
* @throws \InvalidArgumentException When the number of messages to consume is less than 0
* @throws \BadFunctionCallException When the pcntl is not installed and option -s is true
*/
Expand Down Expand Up @@ -74,7 +72,7 @@ protected function initialize(InputInterface $input, OutputInterface $output): v

$this->consumer = $this->connection->getConsumer($input->getArgument('name'));

/** @var int|NULL $memoryLimit */
/** @var int|null $memoryLimit */
$memoryLimit = $input->getOption('memory-limit');
if ($memoryLimit !== NULL && \ctype_digit((string) $memoryLimit) && $memoryLimit > 0) {
$this->consumer->setMemoryLimit($memoryLimit);
Expand All @@ -86,10 +84,6 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
}
}

/**
* @param \Symfony\Component\Console\Input\InputInterface $input An InputInterface instance
* @param \Symfony\Component\Console\Output\OutputInterface $output An OutputInterface instance
*/
protected function execute(InputInterface $input, OutputInterface $output): void
{
$this->consumer->consume($this->amount);
Expand Down
2 changes: 0 additions & 2 deletions src/Kdyby/RabbitMq/Command/RpcServerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ protected function configure(): void
/**
* Executes the current command.
*
* @param \Symfony\Component\Console\Input\InputInterface $input An InputInterface instance
* @param \Symfony\Component\Console\Output\OutputInterface $output An OutputInterface instance
* @throws \InvalidArgumentException When the number of messages to consume is less than 0
*/
protected function execute(InputInterface $input, OutputInterface $output): void
Expand Down
3 changes: 0 additions & 3 deletions src/Kdyby/RabbitMq/Command/StdInProducerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ protected function configure(): void

/**
* Executes the current command.
*
* @param \Symfony\Component\Console\Input\InputInterface $input An InputInterface instance
* @param \Symfony\Component\Console\Output\OutputInterface $output An OutputInterface instance
*/
protected function execute(InputInterface $input, OutputInterface $output): void
{
Expand Down
6 changes: 3 additions & 3 deletions src/Kdyby/RabbitMq/DI/ClassAliasMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
declare(strict_types = 1);

return [
\Kdyby\RabbitMq\Exception::class => \Kdyby\RabbitMq\Exception\Exception::class,
\Kdyby\RabbitMq\Exception::class => \Kdyby\RabbitMq\Exception\Exception::class,
\Kdyby\RabbitMq\InvalidArgumentException::class => \Kdyby\RabbitMq\Exception\InvalidArgumentException::class,
\Kdyby\RabbitMq\QueueNotFoundException::class => \Kdyby\RabbitMq\Exception\QueueNotFoundException::class,
\Kdyby\RabbitMq\TerminateException::class => \Kdyby\RabbitMq\Exception\TerminateException::class,
\Kdyby\RabbitMq\QueueNotFoundException::class => \Kdyby\RabbitMq\Exception\QueueNotFoundException::class,
\Kdyby\RabbitMq\TerminateException::class => \Kdyby\RabbitMq\Exception\TerminateException::class,
];
2 changes: 1 addition & 1 deletion src/Kdyby/RabbitMq/Producer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function setDeliveryMode(int $deliveryMode): IProducer
protected function getBasicProperties(): array
{
return [
'content_type' => $this->contentType,
'content_type' => $this->contentType,
'delivery_mode' => $this->deliveryMode,
];
}
Expand Down

0 comments on commit 0b82c34

Please sign in to comment.