Skip to content

Commit 1660cc1

Browse files
committed
Running php-cs-fixer
Running php-cs-fixer to fix CS drift
1 parent af39d30 commit 1660cc1

24 files changed

+17
-95
lines changed

AmqpConnectionFactory.php

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

3434
/**
35-
* @see \Enqueue\AmqpTools\ConnectionConfig for possible config formats and values.
35+
* @see ConnectionConfig for possible config formats and values.
3636
*
3737
* @param array|string|null $config
3838
*/

AmqpConsumer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(AmqpContext $context, InteropAmqpQueue $queue)
4747
$this->flags = self::FLAG_NOPARAM;
4848
}
4949

50-
public function setConsumerTag(string $consumerTag = null): void
50+
public function setConsumerTag(?string $consumerTag = null): void
5151
{
5252
$this->consumerTag = $consumerTag;
5353
}
@@ -97,7 +97,7 @@ public function receive(int $timeout = 0): ?Message
9797
return $message;
9898
}
9999

100-
usleep(100000); //100ms
100+
usleep(100000); // 100ms
101101
}
102102

103103
return null;
@@ -127,7 +127,6 @@ public function acknowledge(Message $message): void
127127

128128
/**
129129
* @param InteropAmqpMessage $message
130-
* @param bool $requeue
131130
*/
132131
public function reject(Message $message, bool $requeue = false): void
133132
{

AmqpProducer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function send(Destination $destination, Message $message): void
8181
/**
8282
* @return self
8383
*/
84-
public function setDeliveryDelay(int $deliveryDelay = null): Producer
84+
public function setDeliveryDelay(?int $deliveryDelay = null): Producer
8585
{
8686
if (null === $this->delayStrategy) {
8787
throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
@@ -100,7 +100,7 @@ public function getDeliveryDelay(): ?int
100100
/**
101101
* @return self
102102
*/
103-
public function setPriority(int $priority = null): Producer
103+
public function setPriority(?int $priority = null): Producer
104104
{
105105
$this->priority = $priority;
106106

@@ -115,7 +115,7 @@ public function getPriority(): ?int
115115
/**
116116
* @return self
117117
*/
118-
public function setTimeToLive(int $timeToLive = null): Producer
118+
public function setTimeToLive(?int $timeToLive = null): Producer
119119
{
120120
$this->timeToLive = $timeToLive;
121121

AmqpSubscriptionConsumer.php

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

9999
if ($consumer->getConsumerTag() && array_key_exists($consumer->getConsumerTag(), $this->subscribers)) {
@@ -140,7 +140,7 @@ public function subscribe(Consumer $consumer, callable $callback): void
140140
public function unsubscribe(Consumer $consumer): void
141141
{
142142
if (false == $consumer instanceof AmqpConsumer) {
143-
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, get_class($consumer)));
143+
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, $consumer::class));
144144
}
145145

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

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'));

0 commit comments

Comments
 (0)