Test Failed
Pull Request — master (#39)
by Aleksandr
05:36
created
RabbitMq/Consumer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     protected function setup(): Consumer
91 91
     {
92
-        foreach($this->consumings as $index => $consuming) {
92
+        foreach ($this->consumings as $index => $consuming) {
93 93
             $this->channel->basic_qos($consuming->options->qosPrefetchSize, $consuming->options->qosPrefetchCount, false);
94 94
 
95 95
             $options = $consuming->options;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 $options->noAck,
102 102
                 $options->exclusive,
103 103
                 false,
104
-                function (AMQPMessage $message) use ($consuming) {
104
+                function(AMQPMessage $message) use ($consuming) {
105 105
                     $consuming->executeReceiverStrategy->onConsumeCallback($message);
106 106
                     $this->maybeStopConsumer();
107 107
                 });
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                     break;
208 208
                 }
209 209
             } catch (AMQPTimeoutException $e) {
210
-                foreach($this->executeReceiverStrategies as $executeReceiverStrategy) {
210
+                foreach ($this->executeReceiverStrategies as $executeReceiverStrategy) {
211 211
                     $executeReceiverStrategy->onCatchTimeout($e);
212 212
                 }
213 213
                 $now = new \DateTime();
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
         if (!$queueConsuming->noAck) {
292 292
             $messages = array_combine(
293
-                array_map(fn ($message) => $message->getDeliveryTag(), $messages),
293
+                array_map(fn($message) => $message->getDeliveryTag(), $messages),
294 294
                 $messages
295 295
             );
296 296
 
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
     {
307 307
         $executeReceiverStrategy = $this->getExecuteReceiverStrategy($queueConsuming);
308 308
 
309
-        $ack = !array_search(fn ($reply) => $reply !== ReceiverInterface::MSG_ACK, $replies, true);
309
+        $ack = !array_search(fn($reply) => $reply !== ReceiverInterface::MSG_ACK, $replies, true);
310 310
         if ($this->multiAck && count($messages) > 1 && $ack) {
311
-            $channels = array_map(fn ($message) => $message->getChannel(), $messages);
311
+            $channels = array_map(fn($message) => $message->getChannel(), $messages);
312 312
             if (count($channels) !== array_unique($channels)) { // all messages have same channel
313 313
                 throw new InvalidArgumentException('Messages can not be processed as multi ack with different channels');
314 314
             }
Please login to merge, or discard this patch.
Command/ConsumerCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             new ConsoleLogger($output)
114 114
         );
115 115
         $declarationRegistry = $this->container->get('old_sound_rabbit_mq.declaration_registry');
116
-        foreach($consumer->getConsumings() as $queueConsuming) {
116
+        foreach ($consumer->getConsumings() as $queueConsuming) {
117 117
             $declarator->declareForQueueDeclaration($queueConsuming->queue, $declarationRegistry);
118 118
         }
119 119
     }
Please login to merge, or discard this patch.