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
{

Tests/Spec/AmqpSendAndReceivePriorityMessagesFromQueueTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class AmqpSendAndReceivePriorityMessagesFromQueueTest extends SendAndReceivePriorityMessagesFromQueueSpec
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
protected function createContext()
1916
{
2017
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -23,8 +20,6 @@ protected function createContext()
2320
}
2421

2522
/**
26-
* {@inheritdoc}
27-
*
2823
* @param AmqpContext $context
2924
*/
3025
protected function createQueue(Context $context, $queueName)

Tests/Spec/AmqpSendAndReceiveTimeToLiveMessagesFromQueueTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class AmqpSendAndReceiveTimeToLiveMessagesFromQueueTest extends SendAndReceiveTimeToLiveMessagesFromQueueSpec
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
protected function createContext()
1916
{
2017
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -23,8 +20,6 @@ protected function createContext()
2320
}
2421

2522
/**
26-
* {@inheritdoc}
27-
*
2823
* @param AmqpContext $context
2924
*/
3025
protected function createQueue(Context $context, $queueName)

Tests/Spec/AmqpSendAndReceiveTimestampAsIntengerTest.php

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

Tests/Spec/AmqpSendToAndReceiveFromQueueTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class AmqpSendToAndReceiveFromQueueTest extends SendToAndReceiveFromQueueSpec
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
protected function createContext()
1916
{
2017
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -23,8 +20,6 @@ protected function createContext()
2320
}
2421

2522
/**
26-
* {@inheritdoc}
27-
*
2823
* @param AmqpContext $context
2924
*/
3025
protected function createQueue(Context $context, $queueName)

Tests/Spec/AmqpSendToAndReceiveFromTopicTest.php

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

2623
/**
27-
* {@inheritdoc}
28-
*
2924
* @param AmqpContext $context
3025
*/
3126
protected function createTopic(Context $context, $topicName)

Tests/Spec/AmqpSendToAndReceiveNoWaitFromQueueTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class AmqpSendToAndReceiveNoWaitFromQueueTest extends SendToAndReceiveNoWaitFromQueueSpec
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
protected function createContext()
1916
{
2017
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -23,8 +20,6 @@ protected function createContext()
2320
}
2421

2522
/**
26-
* {@inheritdoc}
27-
*
2823
* @param AmqpContext $context
2924
*/
3025
protected function createQueue(Context $context, $queueName)

Tests/Spec/AmqpSendToAndReceiveNoWaitFromTopicTest.php

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

2623
/**
27-
* {@inheritdoc}
28-
*
2924
* @param AmqpContext $context
3025
*/
3126
protected function createTopic(Context $context, $topicName)

Tests/Spec/AmqpSendToTopicAndReceiveFromQueueTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
*/
1515
class AmqpSendToTopicAndReceiveFromQueueTest extends SendToTopicAndReceiveFromQueueSpec
1616
{
17-
/**
18-
* {@inheritdoc}
19-
*/
2017
protected function createContext()
2118
{
2219
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -25,8 +22,6 @@ protected function createContext()
2522
}
2623

2724
/**
28-
* {@inheritdoc}
29-
*
3025
* @param AmqpContext $context
3126
*/
3227
protected function createQueue(Context $context, $queueName)
@@ -41,8 +36,6 @@ protected function createQueue(Context $context, $queueName)
4136
}
4237

4338
/**
44-
* {@inheritdoc}
45-
*
4639
* @param AmqpContext $context
4740
*/
4841
protected function createTopic(Context $context, $topicName)

Tests/Spec/AmqpSendToTopicAndReceiveNoWaitFromQueueTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
*/
1515
class AmqpSendToTopicAndReceiveNoWaitFromQueueTest extends SendToTopicAndReceiveNoWaitFromQueueSpec
1616
{
17-
/**
18-
* {@inheritdoc}
19-
*/
2017
protected function createContext()
2118
{
2219
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -25,8 +22,6 @@ protected function createContext()
2522
}
2623

2724
/**
28-
* {@inheritdoc}
29-
*
3025
* @param AmqpContext $context
3126
*/
3227
protected function createQueue(Context $context, $queueName)
@@ -41,8 +36,6 @@ protected function createQueue(Context $context, $queueName)
4136
}
4237

4338
/**
44-
* {@inheritdoc}
45-
*
4639
* @param AmqpContext $context
4740
*/
4841
protected function createTopic(Context $context, $topicName)

Tests/Spec/AmqpSslSendToAndReceiveFromQueueTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
*/
1313
class AmqpSslSendToAndReceiveFromQueueTest extends SendToAndReceiveFromQueueSpec
1414
{
15-
/**
16-
* {@inheritdoc}
17-
*/
1815
protected function createContext()
1916
{
2017
$baseDir = realpath(__DIR__.'/../../../../');
@@ -37,8 +34,6 @@ protected function createContext()
3734
}
3835

3936
/**
40-
* {@inheritdoc}
41-
*
4237
* @param AmqpContext $context
4338
*/
4439
protected function createQueue(Context $context, $queueName)

Tests/Spec/AmqpSubscriptionConsumerConsumeFromAllSubscribedQueuesTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class AmqpSubscriptionConsumerConsumeFromAllSubscribedQueuesTest extends Subscri
1515
{
1616
/**
1717
* @return AmqpContext
18-
*
19-
* {@inheritdoc}
2018
*/
2119
protected function createContext()
2220
{
@@ -30,8 +28,6 @@ protected function createContext()
3028

3129
/**
3230
* @param AmqpContext $context
33-
*
34-
* {@inheritdoc}
3531
*/
3632
protected function createQueue(Context $context, $queueName)
3733
{

Tests/Spec/AmqpSubscriptionConsumerConsumeUntilUnsubscribedTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ protected function tearDown(): void
2424

2525
/**
2626
* @return AmqpContext
27-
*
28-
* {@inheritdoc}
2927
*/
3028
protected function createContext()
3129
{
@@ -39,8 +37,6 @@ protected function createContext()
3937

4038
/**
4139
* @param AmqpContext $context
42-
*
43-
* {@inheritdoc}
4440
*/
4541
protected function createQueue(Context $context, $queueName)
4642
{

0 commit comments

Comments
 (0)