Test Failed
Pull Request — master (#39)
by Aleksandr
08:40
created
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.
RabbitMq/Consumer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     protected function setup(): Consumer
77 77
     {
78
-        foreach($this->consumings as $index => $consuming) {
78
+        foreach ($this->consumings as $index => $consuming) {
79 79
             $this->channel->basic_qos($consuming->options->qosPrefetchSize, $consuming->options->qosPrefetchCount, false);
80 80
 
81 81
             $options = $consuming->options;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 $options->noAck,
88 88
                 $options->exclusive,
89 89
                 false,
90
-                function (AMQPMessage $message) use ($consuming) {
90
+                function(AMQPMessage $message) use ($consuming) {
91 91
                     $flags = $consuming->executeReceiverStrategy->onConsumeCallback($message);
92 92
                     if ($flags) {
93 93
                         $this->handleProcessMessages($flags, $consuming);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                     break;
201 201
                 }
202 202
             } catch (AMQPTimeoutException $e) {
203
-                foreach($this->executeReceiverStrategies as $executeReceiverStrategy) {
203
+                foreach ($this->executeReceiverStrategies as $executeReceiverStrategy) {
204 204
                     $executeReceiverStrategy->onCatchTimeout($e);
205 205
                 }
206 206
                 $now = new \DateTime();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
     private function handleProcessMessages(array $flags, Consuming $consuming)
230 230
     {
231
-        $ack = !array_search(fn ($reply) => $reply !== ReceiverInterface::MSG_ACK, $flags, true);
231
+        $ack = !array_search(fn($reply) => $reply !== ReceiverInterface::MSG_ACK, $flags, true);
232 232
         if ($this->multiAck && count($flags) > 1 && $ack) {
233 233
             $lastDeliveryTag = array_key_last($flags);
234 234
 
Please login to merge, or discard this patch.