Passed
Push — master ( ed2263...7672bd )
by Mihai
04:36
created
Command/SetupFabricCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         $partsHolder = $this->getContainer()->get('old_sound_rabbit_mq.parts_holder');
30 30
 
31 31
         foreach (array('base_amqp', 'binding') as $key) {
32
-            foreach ($partsHolder->getParts('old_sound_rabbit_mq.' . $key) as $baseAmqp) {
32
+            foreach ($partsHolder->getParts('old_sound_rabbit_mq.'.$key) as $baseAmqp) {
33 33
                 if ($baseAmqp instanceof DynamicConsumer) {
34 34
                     continue;
35 35
                 }
Please login to merge, or discard this patch.
MemoryChecker/MemoryConsumptionChecker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             }
60 60
         }
61 61
 
62
-        return (int)$numerical;
62
+        return (int) $numerical;
63 63
     }
64 64
 
65 65
 }
Please login to merge, or discard this patch.
Tests/RabbitMq/RpcClientTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $serializer->expects($this->once())->method('deserialize')->with('message', 'json', null);
27 27
         $client->initClient(true);
28 28
         $client->setUnserializer(function($data) use ($serializer) {
29
-            $serializer->deserialize($data, 'json','');
29
+            $serializer->deserialize($data, 'json', '');
30 30
         });
31 31
         $client->processMessage($message);
32 32
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             ->setConstructorArgs(array($expectedNotify))
46 46
             ->getMock();
47 47
         $notified = false;
48
-        $client->notify(function ($message) use (&$notified) {
48
+        $client->notify(function($message) use (&$notified) {
49 49
             $notified = $message;
50 50
         });
51 51
 
Please login to merge, or discard this patch.
Tests/RabbitMq/AMQPConnectionFactoryTest.php 1 patch
Spacing   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
23 23
         $this->assertEquals(array(
24 24
             'localhost', // host
25
-            5672,        // port
26
-            'guest',     // user
27
-            'guest',     // password
28
-            '/',         // vhost
29
-            false,       // insist
30
-            "AMQPLAIN",  // login method
31
-            null,        // login response
32
-            "en_US",     // locale
33
-            3,           // connection timeout
34
-            3,           // read write timeout
35
-            null,        // context
36
-            false,       // keepalive
37
-            0,           // heartbeat
25
+            5672, // port
26
+            'guest', // user
27
+            'guest', // password
28
+            '/', // vhost
29
+            false, // insist
30
+            "AMQPLAIN", // login method
31
+            null, // login response
32
+            "en_US", // locale
33
+            3, // connection timeout
34
+            3, // read write timeout
35
+            null, // context
36
+            false, // keepalive
37
+            0, // heartbeat
38 38
         ), $instance->constructParams);
39 39
     }
40 40
 
@@ -50,18 +50,18 @@  discard block
 block discarded – undo
50 50
         $this->assertInstanceOf('PhpAmqpLib\Connection\AMQPSocketConnection', $instance);
51 51
         $this->assertEquals(array(
52 52
             'localhost', // host
53
-            5672,        // port
54
-            'guest',     // user
55
-            'guest',     // password
56
-            '/',         // vhost
57
-            false,       // insist
58
-            "AMQPLAIN",  // login method
59
-            null,        // login response
60
-            "en_US",     // locale
61
-            3,           // read_timeout
62
-            false,       // keepalive
63
-            3,           // write_timeout
64
-            0,           // heartbeat
53
+            5672, // port
54
+            'guest', // user
55
+            'guest', // password
56
+            '/', // vhost
57
+            false, // insist
58
+            "AMQPLAIN", // login method
59
+            null, // login response
60
+            "en_US", // locale
61
+            3, // read_timeout
62
+            false, // keepalive
63
+            3, // write_timeout
64
+            0, // heartbeat
65 65
         ), $instance->constructParams);
66 66
     }
67 67
 
@@ -80,18 +80,18 @@  discard block
 block discarded – undo
80 80
         $this->assertInstanceOf('PhpAmqpLib\Connection\AMQPSocketConnection', $instance);
81 81
         $this->assertEquals(array(
82 82
             'localhost', // host
83
-            5672,        // port
84
-            'guest',     // user
85
-            'guest',     // password
86
-            '/',         // vhost
87
-            false,       // insist
88
-            "AMQPLAIN",  // login method
89
-            null,        // login response
90
-            "en_US",     // locale
91
-            31,           // read_timeout
92
-            false,       // keepalive
93
-            32,           // write_timeout
94
-            0,           // heartbeat
83
+            5672, // port
84
+            'guest', // user
85
+            'guest', // password
86
+            '/', // vhost
87
+            false, // insist
88
+            "AMQPLAIN", // login method
89
+            null, // login response
90
+            "en_US", // locale
91
+            31, // read_timeout
92
+            false, // keepalive
93
+            32, // write_timeout
94
+            0, // heartbeat
95 95
         ), $instance->constructParams);
96 96
     }
97 97
 
@@ -112,20 +112,20 @@  discard block
 block discarded – undo
112 112
         $instance = $factory->createConnection();
113 113
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
114 114
         $this->assertEquals(array(
115
-            'foo_host',  // host
116
-            123,         // port
117
-            'foo_user',  // user
115
+            'foo_host', // host
116
+            123, // port
117
+            'foo_user', // user
118 118
             'foo_password', // password
119
-            '/vhost',    // vhost
120
-            false,       // insist
121
-            "AMQPLAIN",  // login method
122
-            null,        // login response
123
-            "en_US",     // locale
124
-            3,           // connection timeout
125
-            3,           // read write timeout
126
-            null,        // context
127
-            false,       // keepalive
128
-            0,           // heartbeat
119
+            '/vhost', // vhost
120
+            false, // insist
121
+            "AMQPLAIN", // login method
122
+            null, // login response
123
+            "en_US", // locale
124
+            3, // connection timeout
125
+            3, // read write timeout
126
+            null, // context
127
+            false, // keepalive
128
+            0, // heartbeat
129 129
         ), $instance->constructParams);
130 130
     }
131 131
 
@@ -147,20 +147,20 @@  discard block
 block discarded – undo
147 147
         $instance = $factory->createConnection();
148 148
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
149 149
         $this->assertEquals(array(
150
-            'bar_host',  // host
151
-            321,         // port
152
-            'bar_user',  // user
150
+            'bar_host', // host
151
+            321, // port
152
+            'bar_user', // user
153 153
             'bar_password', // password
154
-            'whost',     // vhost
155
-            false,       // insist
156
-            "AMQPLAIN",  // login method
157
-            null,        // login response
158
-            "en_US",     // locale
159
-            6,           // connection timeout
160
-            6,           // read write timeout
161
-            null,        // context
162
-            true,        // keepalive
163
-            0,           // heartbeat
154
+            'whost', // vhost
155
+            false, // insist
156
+            "AMQPLAIN", // login method
157
+            null, // login response
158
+            "en_US", // locale
159
+            6, // connection timeout
160
+            6, // read write timeout
161
+            null, // context
162
+            true, // keepalive
163
+            0, // heartbeat
164 164
         ), $instance->constructParams);
165 165
     }
166 166
 
@@ -177,20 +177,20 @@  discard block
 block discarded – undo
177 177
         $instance = $factory->createConnection();
178 178
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
179 179
         $this->assertEquals(array(
180
-            'hoast',     // host
181
-            10000,       // port
182
-            'usera',     // user
183
-            'apass',     // password
184
-            'v/host',    // vhost
185
-            false,       // insist
186
-            "AMQPLAIN",  // login method
187
-            null,        // login response
188
-            "en_US",     // locale
189
-            6,           // connection timeout
190
-            6,           // read write timeout
191
-            null,        // context
192
-            true,        // keepalive
193
-            0,           // heartbeat
180
+            'hoast', // host
181
+            10000, // port
182
+            'usera', // user
183
+            'apass', // password
184
+            'v/host', // vhost
185
+            false, // insist
186
+            "AMQPLAIN", // login method
187
+            null, // login response
188
+            "en_US", // locale
189
+            6, // connection timeout
190
+            6, // read write timeout
191
+            null, // context
192
+            true, // keepalive
193
+            0, // heartbeat
194 194
         ), $instance->constructParams);
195 195
     }
196 196
 
@@ -207,20 +207,20 @@  discard block
 block discarded – undo
207 207
         $instance = $factory->createConnection();
208 208
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
209 209
         $this->assertEquals(array(
210
-            'host',     // host
211
-            321,        // port
212
-            'user',     // user
213
-            'pass',     // password
214
-            '',         // vhost
215
-            false,      // insist
210
+            'host', // host
211
+            321, // port
212
+            'user', // user
213
+            'pass', // password
214
+            '', // vhost
215
+            false, // insist
216 216
             "AMQPLAIN", // login method
217
-            null,       // login response
218
-            "en_US",    // locale
219
-            6,          // connection timeout
220
-            6,          // read write timeout
221
-            null,       // context
222
-            true,       // keepalive
223
-            0,          // heartbeat
217
+            null, // login response
218
+            "en_US", // locale
219
+            6, // connection timeout
220
+            6, // read write timeout
221
+            null, // context
222
+            true, // keepalive
223
+            0, // heartbeat
224 224
         ), $instance->constructParams);
225 225
     }
226 226
 
@@ -253,19 +253,19 @@  discard block
 block discarded – undo
253 253
         $this->assertEquals(array('ssl' => array('verify_peer' => false)), $options);
254 254
         $this->assertEquals(array(
255 255
             'ssl_host', // host
256
-            123,        // port
256
+            123, // port
257 257
             'ssl_user', // user
258 258
             'ssl_password', // password
259
-            '/ssl',      // vhost
260
-            false,       // insist
261
-            "AMQPLAIN",  // login method
262
-            null,        // login response
263
-            "en_US",     // locale
264
-            3,           // connection timeout
265
-            3,           // read write timeout
266
-            null,        // context checked earlier
267
-            false,       // keepalive
268
-            0,           // heartbeat
259
+            '/ssl', // vhost
260
+            false, // insist
261
+            "AMQPLAIN", // login method
262
+            null, // login response
263
+            "en_US", // locale
264
+            3, // connection timeout
265
+            3, // read write timeout
266
+            null, // context checked earlier
267
+            false, // keepalive
268
+            0, // heartbeat
269 269
         ), $instance->constructParams);
270 270
     }
271 271
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
             ->method('getConnectionParameters')
277 277
             ->will($this->returnValue(
278 278
                 array(
279
-                    'constructor_args' => array(1,2,3,4)
279
+                    'constructor_args' => array(1, 2, 3, 4)
280 280
                 )
281 281
             ));
282 282
         $factory = new AMQPConnectionFactory(
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         /** @var AMQPConnection $instance */
289 289
         $instance = $factory->createConnection();
290 290
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
291
-        $this->assertEquals(array(1,2,3,4), $instance->constructParams);
291
+        $this->assertEquals(array(1, 2, 3, 4), $instance->constructParams);
292 292
     }
293 293
 
294 294
     public function testConnectionsParametersProvider()
@@ -315,20 +315,20 @@  discard block
 block discarded – undo
315 315
         $instance = $factory->createConnection();
316 316
         $this->assertInstanceOf('OldSound\RabbitMqBundle\Tests\RabbitMq\Fixtures\AMQPConnection', $instance);
317 317
         $this->assertEquals(array(
318
-            '1.2.3.4',   // host
319
-            5678,        // port
320
-            'admin',     // user
321
-            'admin',     // password
322
-            'foo',       // vhost
323
-            false,       // insist
324
-            "AMQPLAIN",  // login method
325
-            null,        // login response
326
-            "en_US",     // locale
327
-            3,           // connection timeout
328
-            3,           // read write timeout
329
-            null,        // context
330
-            false,       // keepalive
331
-            0,           // heartbeat
318
+            '1.2.3.4', // host
319
+            5678, // port
320
+            'admin', // user
321
+            'admin', // password
322
+            'foo', // vhost
323
+            false, // insist
324
+            "AMQPLAIN", // login method
325
+            null, // login response
326
+            "en_US", // locale
327
+            3, // connection timeout
328
+            3, // read write timeout
329
+            null, // context
330
+            false, // keepalive
331
+            0, // heartbeat
332 332
         ), $instance->constructParams);
333 333
     }
334 334
 
Please login to merge, or discard this patch.
Tests/RabbitMq/RpcServerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
             ->disableOriginalConstructor()
17 17
             ->getMock();
18 18
         $message = $this->getMockBuilder('\PhpAmqpLib\Message\AMQPMessage')
19
-            ->setMethods( array('get'))
19
+            ->setMethods(array('get'))
20 20
             ->getMock();
21 21
         $message->delivery_info = array(
22 22
             'channel' => $this->getMockBuilder('\PhpAmqpLib\Channel\AMQPChannel')
Please login to merge, or discard this patch.
Tests/RabbitMq/BindingTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $key = 'example_key';
47 47
         $ch->expects($this->once())
48 48
             ->method('queue_bind')
49
-            ->will($this->returnCallback(function ($d, $s, $k, $n, $a) use ($destination, $source, $key) {
49
+            ->will($this->returnCallback(function($d, $s, $k, $n, $a) use ($destination, $source, $key) {
50 50
                 Assert::assertSame($destination, $d);
51 51
                 Assert::assertSame($source, $s);
52 52
                 Assert::assertSame($key, $k);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $key = 'example_key';
72 72
         $ch->expects($this->once())
73 73
             ->method('exchange_bind')
74
-            ->will($this->returnCallback(function ($d, $s, $k, $n, $a) use ($destination, $source, $key) {
74
+            ->will($this->returnCallback(function($d, $s, $k, $n, $a) use ($destination, $source, $key) {
75 75
                 Assert::assertSame($destination, $d);
76 76
                 Assert::assertSame($source, $s);
77 77
                 Assert::assertSame($key, $k);
Please login to merge, or discard this patch.
DependencyInjection/OldSoundRabbitMqExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->container = $container;
39 39
 
40
-        $loader = new XmlFileLoader($this->container, new FileLocator(array(__DIR__ . '/../Resources/config')));
40
+        $loader = new XmlFileLoader($this->container, new FileLocator(array(__DIR__.'/../Resources/config')));
41 41
         $loader->load('rabbitmq.xml');
42 42
 
43 43
         $configuration = $this->getConfiguration($configs, $container);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
             if (empty($consumer['queues']) && empty($consumer['queues_provider'])) {
252 252
                 throw new InvalidConfigurationException(
253
-                    "Error on loading $key multiple consumer. " .
253
+                    "Error on loading $key multiple consumer. ".
254 254
                     "Either 'queues' or 'queues_provider' parameters should be defined."
255 255
                 );
256 256
             }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
             if (empty($consumer['queue_options_provider'])) {
332 332
                 throw new InvalidConfigurationException(
333
-                    "Error on loading $key dynamic consumer. " .
333
+                    "Error on loading $key dynamic consumer. ".
334 334
                     "'queue_provider' parameter should be defined."
335 335
                 );
336 336
             }
Please login to merge, or discard this patch.
RabbitMq/AMQPConnectionFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $this->parameters = array_merge($this->parameters, $parameters);
46 46
         $this->parameters = $this->parseUrl($this->parameters);
47 47
         if (is_array($this->parameters['ssl_context'])) {
48
-            $this->parameters['ssl_context'] = ! empty($this->parameters['ssl_context'])
48
+            $this->parameters['ssl_context'] = !empty($this->parameters['ssl_context'])
49 49
                 ? stream_context_create(array('ssl' => $this->parameters['ssl_context']))
50 50
                 : null;
51 51
         }
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
                     $this->parameters['user'],
75 75
                     $this->parameters['password'],
76 76
                     $this->parameters['vhost'],
77
-                    false,      // insist
77
+                    false, // insist
78 78
                     'AMQPLAIN', // login_method
79
-                    null,       // login_response
80
-                    'en_US',    // locale
79
+                    null, // login_response
80
+                    'en_US', // locale
81 81
                     isset($this->parameters['read_timeout']) ? $this->parameters['read_timeout'] : $this->parameters['read_write_timeout'],
82 82
                     $this->parameters['keepalive'],
83 83
                     isset($this->parameters['write_timeout']) ? $this->parameters['write_timeout'] : $this->parameters['read_write_timeout'],
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
                 $this->parameters['user'],
92 92
                 $this->parameters['password'],
93 93
                 $this->parameters['vhost'],
94
-                false,      // insist
94
+                false, // insist
95 95
                 'AMQPLAIN', // login_method
96
-                null,       // login_response
97
-                'en_US',    // locale
96
+                null, // login_response
97
+                'en_US', // locale
98 98
                 $this->parameters['connection_timeout'],
99 99
                 $this->parameters['read_write_timeout'],
100 100
                 $this->parameters['ssl_context'],
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $parameters['host'] = urldecode($url['host']);
129 129
         }
130 130
         if (isset($url['port'])) {
131
-            $parameters['port'] = (int)$url['port'];
131
+            $parameters['port'] = (int) $url['port'];
132 132
         }
133 133
         if (isset($url['user'])) {
134 134
             $parameters['user'] = urldecode($url['user']);
Please login to merge, or discard this patch.
Tests/RabbitMq/MultipleConsumerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
     {
247 247
         $this->amqpChannel->expects($this->any())
248 248
             ->method('basic_reject')
249
-            ->will($this->returnCallback(function ($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) {
249
+            ->will($this->returnCallback(function($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) {
250 250
                 Assert::assertSame($expectedMethod, 'basic_reject'); // Check if this function should be called.
251 251
                 Assert::assertSame($requeue, $expectedRequeue); // Check if the message should be requeued.
252 252
             }));
253 253
 
254 254
         $this->amqpChannel->expects($this->any())
255 255
             ->method('basic_ack')
256
-            ->will($this->returnCallback(function ($delivery_tag) use ($expectedMethod) {
256
+            ->will($this->returnCallback(function($delivery_tag) use ($expectedMethod) {
257 257
                 Assert::assertSame($expectedMethod, 'basic_ack'); // Check if this function should be called.
258 258
             }));
259 259
     }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      */
267 267
     private function prepareCallback($processFlag)
268 268
     {
269
-        return function ($msg) use ($processFlag) {
269
+        return function($msg) use ($processFlag) {
270 270
             return $processFlag;
271 271
         };
272 272
     }
Please login to merge, or discard this patch.