@@ -42,8 +42,8 @@ |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | $this->getContainer() |
| 45 | - ->get(sprintf('old_sound_rabbit_mq.%s_server', $input->getArgument('name'))) |
|
| 46 | - ->start($amount); |
|
| 45 | + ->get(sprintf('old_sound_rabbit_mq.%s_server', $input->getArgument('name'))) |
|
| 46 | + ->start($amount); |
|
| 47 | 47 | |
| 48 | 48 | return 0; |
| 49 | 49 | } |
@@ -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; |
@@ -44,8 +44,8 @@ |
||
| 44 | 44 | ->addOption('connection', 'c', InputOption::VALUE_OPTIONAL, 'Rabbitmq connection name', 'default') |
| 45 | 45 | ->addOption('timeout', 't', InputOption::VALUE_OPTIONAL, 'Timeout', 500) |
| 46 | 46 | ->addOption('qos-prefetch-size', null, InputOption::VALUE_OPTIONAL, 'Qos prefetch size', 0) |
| 47 | - ->addOption('qos-prefetch-count', null,InputOption::VALUE_OPTIONAL, 'Qos prefetch count', 10) |
|
| 48 | - ->addOption('qos-global', null,InputOption::VALUE_OPTIONAL, 'Qos global', true) |
|
| 47 | + ->addOption('qos-prefetch-count', null, InputOption::VALUE_OPTIONAL, 'Qos prefetch count', 10) |
|
| 48 | + ->addOption('qos-global', null, InputOption::VALUE_OPTIONAL, 'Qos global', true) |
|
| 49 | 49 | // TODO ?! ->addOption('messages', 'm', InputOption::VALUE_OPTIONAL, 'Messages to consume', 0) |
| 50 | 50 | // ->addOption('memory-limit', 'l', InputOption::VALUE_OPTIONAL, 'Allowed memory for this process (MB)', null) |
| 51 | 51 | // ->addOption('debug', 'd', InputOption::VALUE_NONE, 'Enable Debugging') |