Test Failed
Pull Request — master (#39)
by Aleksandr
05:36
created
EventListener/PcntlSignalDispatchSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     public function __construct(Consumer $consumer)
23 23
     {
24
-        $stopConsumer = function () use ($consumer) {
24
+        $stopConsumer = function() use ($consumer) {
25 25
             // Process current message, then halt consumer
26 26
             $consumer->forceStopConsumer();
27 27
             // Halt consumer if waiting for a new message from the queue
Please login to merge, or discard this patch.
RabbitMq/AMQPConnectionFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $parameters = $this->parseUrl(array_merge($this->defaultParameters, $parameters));
33 33
         if (is_array($parameters['ssl_context'])) {
34
-            $parameters['ssl_context'] = ! empty($parameters['ssl_context'])
34
+            $parameters['ssl_context'] = !empty($parameters['ssl_context'])
35 35
                 ? stream_context_create(array('ssl' => $parameters['ssl_context']))
36 36
                 : null;
37 37
         }
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
             $parameters['user'],
47 47
             $parameters['password'],
48 48
             $parameters['vhost'],
49
-            false,      // insist
49
+            false, // insist
50 50
             'AMQPLAIN', // login_method
51
-            null,       // login_response
52
-            'en_US',    // locale
51
+            null, // login_response
52
+            'en_US', // locale
53 53
         ];
54 54
 
55 55
         $isSocketConnection = $class == \PhpAmqpLib\Connection\AMQPSocketConnection::class || is_subclass_of($class, \PhpAmqpLib\Connection\AMQPSocketConnection::class);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             $parameters['host'] = urldecode($url['host']);
94 94
         }
95 95
         if (isset($url['port'])) {
96
-            $parameters['port'] = (int)$url['port'];
96
+            $parameters['port'] = (int) $url['port'];
97 97
         }
98 98
         if (isset($url['user'])) {
99 99
             $parameters['user'] = urldecode($url['user']);
Please login to merge, or discard this patch.
Serializer/JsonMessageBodySerializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 'message' => $body->getMessage(),
34 34
             ]);
35 35
         }
36
-        return json_encode($body);// $this->serializer->serialize($body, 'json');
36
+        return json_encode($body); // $this->serializer->serialize($body, 'json');
37 37
     }
38 38
 
39 39
     public function deserialize(string $body)
Please login to merge, or discard this patch.
Command/DeclareCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
         $connection = $input->getArgument('connection');
44 44
         $channelAlias = sprintf('old_sound_rabbit_mq.channel.%s', $connection);
45
-        if(!$this->container->has($channelAlias)) {
45
+        if (!$this->container->has($channelAlias)) {
46 46
             throw new InvalidOptionException('Connection is not exist');
47 47
         };
48 48
 
Please login to merge, or discard this patch.
Declarations/DeclarationsRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function getBindingsByExchange(ExchangeDeclaration $exchange): array
37 37
     {
38
-        return array_filter($this->bindings, function ($binding) use ($exchange) {
38
+        return array_filter($this->bindings, function($binding) use ($exchange) {
39 39
             return $binding->exchange === $exchange->name || ($binding->destinationIsExchange && $binding->destination === $exchange->name);
40 40
         });
41 41
     }
Please login to merge, or discard this patch.
Declarations/QueueDeclaration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function declure() {
40 40
         foreach ($this->queues as $name => $options) {
41
-            list($queueName, ,) = $this->getChannel()->queue_declare($name, $options['passive'],
41
+            list($queueName,,) = $this->getChannel()->queue_declare($name, $options['passive'],
42 42
                 $options['durable'], $options['exclusive'],
43 43
                 $options['auto_delete'], $options['nowait'],
44 44
                 $options['arguments'], $options['ticket']);
Please login to merge, or discard this patch.
Declarations/ConsumerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $consumer = new Consumer($consumerDef->name);
27 27
         $consumer->setChannel($connection->channel());
28 28
 
29
-        foreach([] as $d) {
29
+        foreach ([] as $d) {
30 30
             $consumer->consumeQueue();
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Declarations/Declarator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     public function declareForExchange(ExchangeDeclaration $exchange, DeclarationsRegistry $declarationsRegistry) 
107 107
     {
108 108
         $bindings = $declarationsRegistry->getBindingsByExchange($exchange);
109
-        $queues = array_filter($bindings, function ($binding) use($exchange) {
109
+        $queues = array_filter($bindings, function($binding) use($exchange) {
110 110
             false === $binding->destinationIsExchange && $binding->destination == $exchange->name;
111 111
         });
112 112
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     public function declareForQueueDeclaration(string $queueName, DeclarationsRegistry $declarationsRegistry)
119 119
     {
120
-        $consumerQueues = array_filter($declarationsRegistry->queues, function ($queue) use ($queueName) {
120
+        $consumerQueues = array_filter($declarationsRegistry->queues, function($queue) use ($queueName) {
121 121
             return $queue->name === $queueName;
122 122
             // TODO not found! exception?
123 123
         });
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $bindings = [];
127 127
         $exchanges = [];
128 128
         foreach ($consumerQueues as $queue) {
129
-            $b = array_filter($declarationsRegistry->bindings, function ($binding) use ($queue) {
129
+            $b = array_filter($declarationsRegistry->bindings, function($binding) use ($queue) {
130 130
                 return !$binding->destinationIsExchange && $binding->destination === $queue->name;
131 131
             });
132 132
             $bindings = array_merge($bindings, $b);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             }
139 139
         }
140 140
 
141
-        $exchanges = array_map(fn ($exchange) => $declarationsRegistry->exchanges[$exchange], array_unique($exchanges));
141
+        $exchanges = array_map(fn($exchange) => $declarationsRegistry->exchanges[$exchange], array_unique($exchanges));
142 142
         $this->declareExchanges($exchanges);
143 143
         $this->declareQueues($consumerQueues);
144 144
         $this->declareBindings($bindings);
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     
147 147
     public function declareForQueue(QueueDeclaration $queue)
148 148
     {
149
-        $exchanges = array_map(function ($binding) {
149
+        $exchanges = array_map(function($binding) {
150 150
             return $binding->exchange;
151 151
         }, $queue->bindings);
152 152
 
Please login to merge, or discard this patch.
DependencyInjection/Compiler/ConsumersListCompilerPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     public function process(ContainerBuilder $container)
14 14
     {
15 15
         $taggedConsumers = $container->findTaggedServiceIds('old_sound_rabbit_mq.consumer');
16
-        $consumerNames = array_map(fn ($tags) => $tags[0]['consumer'], $taggedConsumers);
16
+        $consumerNames = array_map(fn($tags) => $tags[0]['consumer'], $taggedConsumers);
17 17
         $container->setParameter('old_sound_rabbit_mq.allowed_consumer_names', $consumerNames);
18 18
     }
19 19
 }
20 20
\ No newline at end of file
Please login to merge, or discard this patch.