Skip to content

Commit 7ff9188

Browse files
Apply fixes from StyleCI (vyuldashev#473)
Co-authored-by: StyleCI Bot <bot@styleci.io>
1 parent 7c7ac39 commit 7ff9188

13 files changed

+105
-82
lines changed

src/Console/ExchangeDeclareCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ class ExchangeDeclareCommand extends Command
1818
protected $description = 'Declare exchange';
1919

2020
/**
21-
* @param RabbitMQConnector $connector
21+
* @param RabbitMQConnector $connector
22+
*
2223
* @throws Exception
2324
*/
2425
public function handle(RabbitMQConnector $connector): void

src/Console/ExchangeDeleteCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class ExchangeDeleteCommand extends Command
1616
protected $description = 'Delete exchange';
1717

1818
/**
19-
* @param RabbitMQConnector $connector
19+
* @param RabbitMQConnector $connector
20+
*
2021
* @throws Exception
2122
*/
2223
public function handle(RabbitMQConnector $connector): void

src/Console/QueueBindCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class QueueBindCommand extends Command
1717
protected $description = 'Bind queue to exchange';
1818

1919
/**
20-
* @param RabbitMQConnector $connector
20+
* @param RabbitMQConnector $connector
21+
*
2122
* @throws Exception
2223
*/
2324
public function handle(RabbitMQConnector $connector): void

src/Console/QueueDeclareCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class QueueDeclareCommand extends Command
1919
protected $description = 'Declare queue';
2020

2121
/**
22-
* @param RabbitMQConnector $connector
22+
* @param RabbitMQConnector $connector
23+
*
2324
* @throws Exception
2425
*/
2526
public function handle(RabbitMQConnector $connector): void

src/Console/QueueDeleteCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class QueueDeleteCommand extends Command
1717
protected $description = 'Delete queue';
1818

1919
/**
20-
* @param RabbitMQConnector $connector
20+
* @param RabbitMQConnector $connector
21+
*
2122
* @throws Exception
2223
*/
2324
public function handle(RabbitMQConnector $connector): void

src/Console/QueuePurgeCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class QueuePurgeCommand extends Command
1919
protected $description = 'Purge all messages in queue';
2020

2121
/**
22-
* @param RabbitMQConnector $connector
22+
* @param RabbitMQConnector $connector
23+
*
2324
* @throws Exception
2425
*/
2526
public function handle(RabbitMQConnector $connector): void

src/Consumer.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ public function setPrefetchCount(int $value): void
6363
/**
6464
* Listen to the given queue in a loop.
6565
*
66-
* @param string $connectionName
67-
* @param string $queue
68-
* @param WorkerOptions $options
66+
* @param string $connectionName
67+
* @param string $queue
68+
* @param WorkerOptions $options
6969
* @return int
70+
*
7071
* @throws Throwable
7172
*/
7273
public function daemon($connectionName, $queue, WorkerOptions $options)
@@ -147,7 +148,7 @@ function (AMQPMessage $message) use ($connection, $options, $connectionName, $qu
147148
$this->exceptions->report($exception);
148149

149150
$this->kill(1);
150-
} catch (Exception | Throwable $exception) {
151+
} catch (Exception|Throwable $exception) {
151152
$this->exceptions->report($exception);
152153

153154
$this->stopWorkerIfLostConnection($exception);
@@ -180,9 +181,9 @@ function (AMQPMessage $message) use ($connection, $options, $connectionName, $qu
180181
/**
181182
* Determine if the daemon should process on this iteration.
182183
*
183-
* @param WorkerOptions $options
184-
* @param string $connectionName
185-
* @param string $queue
184+
* @param WorkerOptions $options
185+
* @param string $connectionName
186+
* @param string $queue
186187
* @return bool
187188
*/
188189
protected function daemonShouldRun(WorkerOptions $options, $connectionName, $queue): bool

src/Horizon/Listeners/RabbitMQFailedEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class RabbitMQFailedEvent
1919
/**
2020
* Create a new listener instance.
2121
*
22-
* @param Dispatcher $events
22+
* @param Dispatcher $events
2323
* @return void
2424
*/
2525
public function __construct(Dispatcher $events)
@@ -30,7 +30,7 @@ public function __construct(Dispatcher $events)
3030
/**
3131
* Handle the event.
3232
*
33-
* @param LaravelJobFailed $event
33+
* @param LaravelJobFailed $event
3434
* @return void
3535
*/
3636
public function handle(LaravelJobFailed $event): void

src/Horizon/RabbitMQQueue.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class RabbitMQQueue extends BaseRabbitMQQueue
2525
/**
2626
* Get the number of queue jobs that are ready to process.
2727
*
28-
* @param string|null $queue
28+
* @param string|null $queue
2929
* @return int
30+
*
3031
* @throws AMQPProtocolChannelException
3132
*/
3233
public function readyNow($queue = null): int
@@ -93,9 +94,10 @@ public function release($delay, $job, $data, $queue, $attempts = 0)
9394
/**
9495
* Fire the job deleted event.
9596
*
96-
* @param string $queue
97-
* @param RabbitMQJob $job
97+
* @param string $queue
98+
* @param RabbitMQJob $job
9899
* @return void
100+
*
99101
* @throws BindingResolutionException
100102
*/
101103
public function deleteReserved($queue, $job): void
@@ -106,9 +108,10 @@ public function deleteReserved($queue, $job): void
106108
/**
107109
* Fire the given event if a dispatcher is bound.
108110
*
109-
* @param string $queue
110-
* @param mixed $event
111+
* @param string $queue
112+
* @param mixed $event
111113
* @return void
114+
*
112115
* @throws BindingResolutionException
113116
*/
114117
protected function event($queue, $event): void

src/Queue/Connectors/RabbitMQConnector.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public function __construct(Dispatcher $dispatcher)
3131
/**
3232
* Establish a queue connection.
3333
*
34-
* @param array $config
35-
*
34+
* @param array $config
3635
* @return RabbitMQQueue
36+
*
3737
* @throws Exception
3838
*/
3939
public function connect(array $config): Queue
@@ -63,8 +63,9 @@ public function connect(array $config): Queue
6363
}
6464

6565
/**
66-
* @param array $config
66+
* @param array $config
6767
* @return AbstractConnection
68+
*
6869
* @throws Exception
6970
*/
7071
protected function createConnection(array $config): AbstractConnection
@@ -84,10 +85,10 @@ protected function createConnection(array $config): AbstractConnection
8485
/**
8586
* Create a queue for the worker.
8687
*
87-
* @param string $worker
88-
* @param AbstractConnection $connection
89-
* @param string $queue
90-
* @param array $options
88+
* @param string $worker
89+
* @param AbstractConnection $connection
90+
* @param string $queue
91+
* @param array $options
9192
* @return HorizonRabbitMQQueue|RabbitMQQueue|Queue
9293
*/
9394
protected function createQueue(string $worker, AbstractConnection $connection, string $queue, array $options = [])
@@ -105,7 +106,7 @@ protected function createQueue(string $worker, AbstractConnection $connection, s
105106
/**
106107
* Recursively filter only null values.
107108
*
108-
* @param array $array
109+
* @param array $array
109110
* @return array
110111
*/
111112
private function filter(array $array): array

src/Queue/Jobs/RabbitMQJob.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public function delete(): void
118118
/**
119119
* Release the job back into the queue.
120120
*
121-
* @param int $delay
121+
* @param int $delay
122+
*
122123
* @throws AMQPProtocolChannelException
123124
*/
124125
public function release($delay = 0): void

0 commit comments

Comments
 (0)