@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $amqpChannel = $this->prepareAMQPChannel(); |
50 | 50 | $consumer = $this->getConsumer($amqpConnection, $amqpChannel); |
51 | 51 | |
52 | - $callbackFunction = function () use ($processFlag) { |
|
52 | + $callbackFunction = function() use ($processFlag) { |
|
53 | 53 | return $processFlag; |
54 | 54 | }; // Create a callback function with a return value set by the data provider. |
55 | 55 | $consumer->setCallback($callbackFunction); |
@@ -62,14 +62,14 @@ discard block |
||
62 | 62 | if ($expectedMethod) { |
63 | 63 | $amqpChannel->expects($this->any()) |
64 | 64 | ->method('basic_reject') |
65 | - ->will($this->returnCallback(function ($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) { |
|
65 | + ->will($this->returnCallback(function($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) { |
|
66 | 66 | Assert::assertSame($expectedMethod, 'basic_reject'); // Check if this function should be called. |
67 | 67 | Assert::assertSame($requeue, $expectedRequeue); // Check if the message should be requeued. |
68 | 68 | })); |
69 | 69 | |
70 | 70 | $amqpChannel->expects($this->any()) |
71 | 71 | ->method('basic_ack') |
72 | - ->will($this->returnCallback(function ($delivery_tag) use ($expectedMethod) { |
|
72 | + ->will($this->returnCallback(function($delivery_tag) use ($expectedMethod) { |
|
73 | 73 | Assert::assertSame($expectedMethod, 'basic_ack'); // Check if this function should be called. |
74 | 74 | })); |
75 | 75 | } else { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | ->with(null, false, $consumer->getIdleTimeout()) |
175 | 175 | ->will( |
176 | 176 | $this->returnCallback( |
177 | - function () use ($amqpChannel) { |
|
177 | + function() use ($amqpChannel) { |
|
178 | 178 | /** remove an element on each loop like ... simulate an ACK */ |
179 | 179 | array_splice($amqpChannel->callbacks, 0, 1); |
180 | 180 | }) |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | $eventDispatcher->expects($this->at(1)) |
260 | 260 | ->method('dispatch') |
261 | 261 | ->with($this->isInstanceOf(OnIdleEvent::class), OnIdleEvent::NAME) |
262 | - ->willReturnCallback(function (OnIdleEvent $event, $eventName) { |
|
262 | + ->willReturnCallback(function(OnIdleEvent $event, $eventName) { |
|
263 | 263 | $event->setForceStop(false); |
264 | 264 | |
265 | 265 | return $event; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $eventDispatcher->expects($this->at(3)) |
269 | 269 | ->method('dispatch') |
270 | 270 | ->with($this->isInstanceOf(OnIdleEvent::class), OnIdleEvent::NAME) |
271 | - ->willReturnCallback(function (OnIdleEvent $event, $eventName) { |
|
271 | + ->willReturnCallback(function(OnIdleEvent $event, $eventName) { |
|
272 | 272 | $event->setForceStop(true); |
273 | 273 | |
274 | 274 | return $event; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | $this->container = $container; |
40 | 40 | |
41 | - $loader = new XmlFileLoader($this->container, new FileLocator(array(__DIR__ . '/../Resources/config'))); |
|
41 | + $loader = new XmlFileLoader($this->container, new FileLocator(array(__DIR__.'/../Resources/config'))); |
|
42 | 42 | $loader->load('rabbitmq.xml'); |
43 | 43 | |
44 | 44 | $configuration = $this->getConfiguration($configs, $container); |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $definition->addTag('old_sound_rabbit_mq.base_amqp'); |
191 | 191 | $definition->addTag('old_sound_rabbit_mq.consumer'); |
192 | 192 | foreach ($consumer['groups'] as $group) { |
193 | - $definition->addTag('old_sound_rabbit_mq.consumer.group.' . $group); |
|
193 | + $definition->addTag('old_sound_rabbit_mq.consumer.group.'.$group); |
|
194 | 194 | } |
195 | 195 | //this consumer doesn't define an exchange -> using AMQP Default |
196 | 196 | if (!isset($consumer['exchange_options'])) { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | if (empty($consumer['queues']) && empty($consumer['queues_provider'])) { |
257 | 257 | throw new InvalidConfigurationException( |
258 | - "Error on loading $key multiple consumer. " . |
|
258 | + "Error on loading $key multiple consumer. ". |
|
259 | 259 | "Either 'queues' or 'queues_provider' parameters should be defined." |
260 | 260 | ); |
261 | 261 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | ->addMethodCall('setQueues', array($this->normalizeArgumentKeys($queues))); |
276 | 276 | |
277 | 277 | foreach ($consumer['groups'] as $group) { |
278 | - $definition->addTag('old_sound_rabbit_mq.consumer.group.' . $group); |
|
278 | + $definition->addTag('old_sound_rabbit_mq.consumer.group.'.$group); |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | if ($consumer['queues_provider']) { |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | |
340 | 340 | if (empty($consumer['queue_options_provider'])) { |
341 | 341 | throw new InvalidConfigurationException( |
342 | - "Error on loading $key dynamic consumer. " . |
|
342 | + "Error on loading $key dynamic consumer. ". |
|
343 | 343 | "'queue_provider' parameter should be defined." |
344 | 344 | ); |
345 | 345 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | ->addMethodCall('setCallback', array(array(new Reference($consumer['callback']), 'execute'))); |
355 | 355 | |
356 | 356 | foreach ($consumer['groups'] as $group) { |
357 | - $definition->addTag('old_sound_rabbit_mq.consumer.group.' . $group); |
|
357 | + $definition->addTag('old_sound_rabbit_mq.consumer.group.'.$group); |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | if (array_key_exists('qos_options', $consumer)) { |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | ; |
433 | 433 | |
434 | 434 | foreach ($consumer['groups'] as $group) { |
435 | - $definition->addTag('old_sound_rabbit_mq.consumer.group.' . $group); |
|
435 | + $definition->addTag('old_sound_rabbit_mq.consumer.group.'.$group); |
|
436 | 436 | } |
437 | 437 | |
438 | 438 | if (isset($consumer['idle_timeout_exit_code'])) { |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | foreach ($consumer['groups'] as $group) { |
490 | - $definition->addTag('old_sound_rabbit_mq.consumer.group.' . $group); |
|
490 | + $definition->addTag('old_sound_rabbit_mq.consumer.group.'.$group); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | $name = sprintf('old_sound_rabbit_mq.%s_anon', $key); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | $this->injectLoggedChannel($definition, $key, $group['connection']); |
511 | 511 | } |
512 | 512 | |
513 | - $definition->addMethodCall('addConsumers', [new TaggedIteratorArgument('old_sound_rabbit_mq.consumer.group.' . $key)]); |
|
513 | + $definition->addMethodCall('addConsumers', [new TaggedIteratorArgument('old_sound_rabbit_mq.consumer.group.'.$key)]); |
|
514 | 514 | |
515 | 515 | if (array_key_exists('qos_options', $group)) { |
516 | 516 | $definition->addMethodCall('setQosOptions', array( |