Skip to content

Commit c636012

Browse files
committed
Running php-cs-fixer
Running php-cs-fixer to fix CS drift
1 parent 5ab9059 commit c636012

26 files changed

+13
-97
lines changed

AmqpConnectionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class AmqpConnectionFactory implements InteropAmqpConnectionFactory, DelayStrate
2424
private $connection;
2525

2626
/**
27-
* @see \Enqueue\AmqpTools\ConnectionConfig for possible config formats and values
27+
* @see ConnectionConfig for possible config formats and values
2828
*
2929
* @param array|string|null $config
3030
*/

AmqpConsumer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(AmqpContext $context, InteropAmqpQueue $queue)
4343
$this->flags = self::FLAG_NOPARAM;
4444
}
4545

46-
public function setConsumerTag(string $consumerTag = null): void
46+
public function setConsumerTag(?string $consumerTag = null): void
4747
{
4848
$this->consumerTag = $consumerTag;
4949
}
@@ -93,7 +93,7 @@ public function receive(int $timeout = 0): ?Message
9393
return $message;
9494
}
9595

96-
usleep(100000); //100ms
96+
usleep(100000); // 100ms
9797
}
9898

9999
return null;

AmqpContext.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,7 @@ public function getExtChannel(): \AMQPChannel
243243
if (false == $this->extChannel) {
244244
$extChannel = call_user_func($this->extChannelFactory);
245245
if (false == $extChannel instanceof \AMQPChannel) {
246-
throw new \LogicException(sprintf(
247-
'The factory must return instance of AMQPChannel. It returns %s',
248-
is_object($extChannel) ? get_class($extChannel) : gettype($extChannel)
249-
));
246+
throw new \LogicException(sprintf('The factory must return instance of AMQPChannel. It returns %s', is_object($extChannel) ? $extChannel::class : gettype($extChannel)));
250247
}
251248

252249
$this->extChannel = $extChannel;

AmqpProducer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function send(Destination $destination, Message $message): void
7272
}
7373
}
7474

75-
public function setDeliveryDelay(int $deliveryDelay = null): Producer
75+
public function setDeliveryDelay(?int $deliveryDelay = null): Producer
7676
{
7777
if (null === $this->delayStrategy) {
7878
throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
@@ -88,7 +88,7 @@ public function getDeliveryDelay(): ?int
8888
return $this->deliveryDelay;
8989
}
9090

91-
public function setPriority(int $priority = null): Producer
91+
public function setPriority(?int $priority = null): Producer
9292
{
9393
$this->priority = $priority;
9494

@@ -100,7 +100,7 @@ public function getPriority(): ?int
100100
return $this->priority;
101101
}
102102

103-
public function setTimeToLive(int $timeToLive = null): Producer
103+
public function setTimeToLive(?int $timeToLive = null): Producer
104104
{
105105
$this->timeToLive = $timeToLive;
106106

AmqpSubscriptionConsumer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function consume(int $timeout = 0): void
8686
public function subscribe(Consumer $consumer, callable $callback): void
8787
{
8888
if (false == $consumer instanceof AmqpConsumer) {
89-
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, get_class($consumer)));
89+
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, $consumer::class));
9090
}
9191

9292
if ($consumer->getConsumerTag() && array_key_exists($consumer->getConsumerTag(), $this->subscribers)) {
@@ -109,7 +109,7 @@ public function subscribe(Consumer $consumer, callable $callback): void
109109
public function unsubscribe(Consumer $consumer): void
110110
{
111111
if (false == $consumer instanceof AmqpConsumer) {
112-
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, get_class($consumer)));
112+
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, $consumer::class));
113113
}
114114

115115
if (false == $consumer->getConsumerTag()) {

Tests/AmqpConsumerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Enqueue\AmqpExt\AmqpConsumer;
66
use Enqueue\AmqpExt\AmqpContext;
77
use Enqueue\Test\ClassExtensionTrait;
8-
use Interop\Amqp\Impl\AmqpQueue;
98
use Interop\Queue\Consumer;
109
use PHPUnit\Framework\MockObject\MockObject;
1110
use PHPUnit\Framework\TestCase;

Tests/Spec/AmqpMessageTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
class AmqpMessageTest extends MessageSpec
99
{
10-
/**
11-
* {@inheritdoc}
12-
*/
1310
protected function createMessage()
1411
{
1512
return new AmqpMessage();

Tests/Spec/AmqpProducerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
*/
1111
class AmqpProducerTest extends ProducerSpec
1212
{
13-
/**
14-
* {@inheritdoc}
15-
*/
1613
protected function createProducer()
1714
{
1815
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));

Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
*/
1414
class AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest extends SendAndReceiveDelayedMessageFromQueueSpec
1515
{
16-
/**
17-
* {@inheritdoc}
18-
*/
1916
protected function createContext()
2017
{
2118
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -26,8 +23,6 @@ protected function createContext()
2623

2724
/**
2825
* @param AmqpContext $context
29-
*
30-
* {@inheritdoc}
3126
*/
3227
protected function createQueue(Context $context, $queueName)
3328
{

Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
*/
1414
class AmqpSendAndReceiveDelayedMessageWithDlxStrategyTest extends SendAndReceiveDelayedMessageFromQueueSpec
1515
{
16-
/**
17-
* {@inheritdoc}
18-
*/
1916
protected function createContext()
2017
{
2118
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -26,8 +23,6 @@ protected function createContext()
2623

2724
/**
2825
* @param AmqpContext $context
29-
*
30-
* {@inheritdoc}
3126
*/
3227
protected function createQueue(Context $context, $queueName)
3328
{

0 commit comments

Comments
 (0)