Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2b3f908

Browse files
committed
Running php-cs-fixer
Running php-cs-fixer to fix CS drift
1 parent 4904558 commit 2b3f908

File tree

431 files changed

+642
-1828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

431 files changed

+642
-1828
lines changed

‎pkg/amqp-bunny/AmqpConnectionFactory.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AmqpConnectionFactory implements InteropAmqpConnectionFactory, DelayStrate
2626
private $client;
2727

2828
/**
29-
* @see \Enqueue\AmqpTools\ConnectionConfig for possible config formats and values
29+
* @see ConnectionConfig for possible config formats and values
3030
*
3131
* @param array|string|null $config
3232
*/
@@ -89,10 +89,10 @@ private function establishConnection(): BunnyClient
8989
$bunnyConfig['timeout'] = $this->config->getConnectionTimeout();
9090

9191
// @see https://github.com/php-enqueue/enqueue-dev/issues/229
92-
// $bunnyConfig['persistent'] = $this->config->isPersisted();
93-
// if ($this->config->isPersisted()) {
94-
// $bunnyConfig['path'] = 'enqueue';//$this->config->getOption('path', $this->config->getOption('vhost'));
95-
// }
92+
// $bunnyConfig['persistent'] = $this->config->isPersisted();
93+
// if ($this->config->isPersisted()) {
94+
// $bunnyConfig['path'] = 'enqueue';//$this->config->getOption('path', $this->config->getOption('vhost'));
95+
// }
9696

9797
if ($this->config->getHeartbeat()) {
9898
$bunnyConfig['heartbeat'] = $this->config->getHeartbeat();

‎pkg/amqp-bunny/AmqpConsumer.php

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

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

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

104104
return null;

‎pkg/amqp-bunny/AmqpContext.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class AmqpContext implements InteropAmqpContext, DelayStrategyAware
5151
* Callable must return instance of \Bunny\Channel once called.
5252
*
5353
* @param Channel|callable $bunnyChannel
54-
* @param array $config
5554
*/
5655
public function __construct($bunnyChannel, array $config)
5756
{
@@ -294,10 +293,7 @@ public function getBunnyChannel(): Channel
294293
if (false == $this->bunnyChannel) {
295294
$bunnyChannel = call_user_func($this->bunnyChannelFactory);
296295
if (false == $bunnyChannel instanceof Channel) {
297-
throw new \LogicException(sprintf(
298-
'The factory must return instance of \Bunny\Channel. It returned %s',
299-
is_object($bunnyChannel) ? get_class($bunnyChannel) : gettype($bunnyChannel)
300-
));
296+
throw new \LogicException(sprintf('The factory must return instance of \Bunny\Channel. It returned %s', is_object($bunnyChannel) ? $bunnyChannel::class : gettype($bunnyChannel)));
301297
}
302298

303299
$this->bunnyChannel = $bunnyChannel;

‎pkg/amqp-bunny/AmqpProducer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function send(Destination $destination, Message $message): void
7979
/**
8080
* @return self
8181
*/
82-
public function setDeliveryDelay(int $deliveryDelay = null): Producer
82+
public function setDeliveryDelay(?int $deliveryDelay = null): Producer
8383
{
8484
if (null === $this->delayStrategy) {
8585
throw DeliveryDelayNotSupportedException::providerDoestNotSupportIt();
@@ -98,7 +98,7 @@ public function getDeliveryDelay(): ?int
9898
/**
9999
* @return self
100100
*/
101-
public function setPriority(int $priority = null): Producer
101+
public function setPriority(?int $priority = null): Producer
102102
{
103103
$this->priority = $priority;
104104

@@ -113,7 +113,7 @@ public function getPriority(): ?int
113113
/**
114114
* @return self
115115
*/
116-
public function setTimeToLive(int $timeToLive = null): Producer
116+
public function setTimeToLive(?int $timeToLive = null): Producer
117117
{
118118
$this->timeToLive = $timeToLive;
119119

‎pkg/amqp-bunny/AmqpSubscriptionConsumer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function consume(int $timeout = 0): void
4747
try {
4848
$this->context->getBunnyChannel()->getClient()->run(0 !== $timeout ? $timeout / 1000 : null);
4949
} catch (ClientException $e) {
50-
if (0 === strpos($e->getMessage(), 'stream_select() failed') && $signalHandler->wasThereSignal()) {
50+
if (str_starts_with($e->getMessage(), 'stream_select() failed') && $signalHandler->wasThereSignal()) {
5151
return;
5252
}
5353

@@ -63,7 +63,7 @@ public function consume(int $timeout = 0): void
6363
public function subscribe(Consumer $consumer, callable $callback): void
6464
{
6565
if (false == $consumer instanceof AmqpConsumer) {
66-
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, get_class($consumer)));
66+
throw new \InvalidArgumentException(sprintf('The consumer must be instance of "%s" got "%s"', AmqpConsumer::class, $consumer::class));
6767
}
6868

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

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

‎pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveDelayedMessageWithDelayPluginStrategyTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ public function test()
1818
$this->markTestIncomplete();
1919
}
2020

21-
/**
22-
* {@inheritdoc}
23-
*/
2421
protected function createContext()
2522
{
2623
$factory = new AmqpConnectionFactory(getenv('AMQP_DSN'));
@@ -31,8 +28,6 @@ protected function createContext()
3128

3229
/**
3330
* @param AmqpContext $context
34-
*
35-
* {@inheritdoc}
3631
*/
3732
protected function createQueue(Context $context, $queueName)
3833
{

‎pkg/amqp-bunny/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
{

‎pkg/amqp-bunny/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)

‎pkg/amqp-bunny/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)

‎pkg/amqp-bunny/Tests/Spec/AmqpSendAndReceiveTimestampAsIntegerTest.php

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /