@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $amqpChannel = $this->prepareAMQPChannel(); |
47 | 47 | $consumer = $this->getConsumer($amqpConnection, $amqpChannel); |
48 | 48 | |
49 | - $callbackFunction = function () use ($processFlag) { |
|
49 | + $callbackFunction = function() use ($processFlag) { |
|
50 | 50 | return $processFlag; |
51 | 51 | }; // Create a callback function with a return value set by the data provider. |
52 | 52 | $consumer->setCallback($callbackFunction); |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | if ($expectedMethod) { |
60 | 60 | $amqpChannel->expects($this->any()) |
61 | 61 | ->method('basic_reject') |
62 | - ->will($this->returnCallback(function ($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) { |
|
62 | + ->will($this->returnCallback(function($delivery_tag, $requeue) use ($expectedMethod, $expectedRequeue) { |
|
63 | 63 | Assert::assertSame($expectedMethod, 'basic_reject'); // Check if this function should be called. |
64 | 64 | Assert::assertSame($requeue, $expectedRequeue); // Check if the message should be requeued. |
65 | 65 | })); |
66 | 66 | |
67 | 67 | $amqpChannel->expects($this->any()) |
68 | 68 | ->method('basic_ack') |
69 | - ->will($this->returnCallback(function ($delivery_tag) use ($expectedMethod) { |
|
69 | + ->will($this->returnCallback(function($delivery_tag) use ($expectedMethod) { |
|
70 | 70 | Assert::assertSame($expectedMethod, 'basic_ack'); // Check if this function should be called. |
71 | 71 | })); |
72 | 72 | } else { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | ->with(null, false, $consumer->getIdleTimeout()) |
172 | 172 | ->will( |
173 | 173 | $this->returnCallback( |
174 | - function () use ($amqpChannel) { |
|
174 | + function() use ($amqpChannel) { |
|
175 | 175 | /** remove an element on each loop like ... simulate an ACK */ |
176 | 176 | array_splice($amqpChannel->callbacks, 0, 1); |
177 | 177 | }) |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $eventDispatcher->expects($this->at(1)) |
258 | 258 | ->method('dispatch') |
259 | 259 | ->with($this->isInstanceOf('OldSound\RabbitMqBundle\Event\OnIdleEvent'), OnIdleEvent::NAME) |
260 | - ->willReturnCallback(function (OnIdleEvent $event, $eventName) { |
|
260 | + ->willReturnCallback(function(OnIdleEvent $event, $eventName) { |
|
261 | 261 | $event->setForceStop(false); |
262 | 262 | |
263 | 263 | return $event; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $eventDispatcher->expects($this->at(3)) |
267 | 267 | ->method('dispatch') |
268 | 268 | ->with($this->isInstanceOf('OldSound\RabbitMqBundle\Event\OnIdleEvent'), OnIdleEvent::NAME) |
269 | - ->willReturn(function (OnIdleEvent $event, $eventName) { |
|
269 | + ->willReturn(function(OnIdleEvent $event, $eventName) { |
|
270 | 270 | $event->setForceStop(true); |
271 | 271 | |
272 | 272 | return $event; |