Completed
Push — master ( 613d98...fa04c9 )
by Rémi
20:40
created
src/Driver/PhpAmqpLibDriver.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
     /**
279 279
      * @param AMQPMessage $message
280 280
      *
281
-     * @return array
281
+     * @return \string[]
282 282
      */
283 283
     private static function getHeaders(AMQPMessage $message)
284 284
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $durable = ($type === self::QUEUE_DURABLE);
58 58
         $exclusive = ($type === self::QUEUE_EXCLUSIVE);
59 59
 
60
-        list($name, , ) = $this->getChannel()->queue_declare($queueName, false, $durable, $exclusive, false);
60
+        list($name,,) = $this->getChannel()->queue_declare($queueName, false, $durable, $exclusive, false);
61 61
 
62 62
         return $name;
63 63
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function declareExchange($exchangeName = '', $type = self::EXCHANGE_TYPE_FANOUT)
74 74
     {
75
-        list($name, , ) = $this->getChannel()->exchange_declare($exchangeName, $type, false, true, false);
75
+        list($name,,) = $this->getChannel()->exchange_declare($exchangeName, $type, false, true, false);
76 76
 
77 77
         return $name;
78 78
     }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             $autoAck,
167 167
             false,
168 168
             false,
169
-            function (AMQPMessage $message) use ($callback, $queueName) {
169
+            function(AMQPMessage $message) use ($callback, $queueName) {
170 170
                 $burrowMessage = new Message(
171 171
                     $message->getBody(),
172 172
                     '', // Impossible to retrieve here
Please login to merge, or discard this patch.
src/Message.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-     * @return array
88
+     * @return string[]
89 89
      */
90 90
     public function getHeaders()
91 91
     {
Please login to merge, or discard this patch.
src/Handler/HandlerBuilder.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,14 +117,12 @@
 block discarded – undo
117 117
         Assertion::notNull($this->sync, 'You must specify if the handler must be sync or async');
118 118
 
119 119
         $syncAsync = ($this->sync) ?
120
-            new SyncConsumerHandler($consumer, $this->driver) :
121
-            new AsyncConsumerHandler($consumer);
120
+            new SyncConsumerHandler($consumer, $this->driver) : new AsyncConsumerHandler($consumer);
122 121
 
123 122
         $ackHandler = new AckHandler($syncAsync, $this->driver, $this->requeueOnFailure);
124 123
 
125 124
         $handler = ($this->stopOnFailure) ?
126
-            new StopOnExceptionHandler($ackHandler) :
127
-            new ContinueOnExceptionHandler($ackHandler);
125
+            new StopOnExceptionHandler($ackHandler) : new ContinueOnExceptionHandler($ackHandler);
128 126
 
129 127
         $syncAsync->setLogger($this->logger);
130 128
         $handler->setLogger($this->logger);
Please login to merge, or discard this patch.
src/Publisher/SyncPublisher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         $this->driver->consume(
56 56
             $replyTo,
57
-            function (Message $message) use ($replyTo, $correlationId, &$response) {
57
+            function(Message $message) use ($replyTo, $correlationId, &$response) {
58 58
                 if ($message->getCorrelationId() == $correlationId) {
59 59
                     $response = $message->getBody();
60 60
                     return QueueHandler::STOP_CONSUMING;
Please login to merge, or discard this patch.
src/Daemon/QueueHandlingDaemon.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
         $this->driver->consume(
61 61
             $this->queueName,
62
-            function (Message $message) {
62
+            function(Message $message) {
63 63
                 $this->monitor->monitor($this, $message);
64 64
                 return $this->handler->handle($message);
65 65
             },
Please login to merge, or discard this patch.
src/Driver/PeclAmqpDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
         $flags = $autoAck ? AMQP_AUTOACK : AMQP_NOPARAM;
166 166
 
167 167
         try {
168
-            $queue->consume(function (\AMQPEnvelope $message) use ($callback, $queueName) {
168
+            $queue->consume(function(\AMQPEnvelope $message) use ($callback, $queueName) {
169 169
 
170 170
                 $burrowMessage = new Message(
171 171
                     $message->getBody(),
Please login to merge, or discard this patch.
examples/async-message-sender-pecl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,5 +23,5 @@
 block discarded – undo
23 23
 $publisher = new AsyncPublisher($driver, 'xchange');
24 24
 
25 25
 for ($i = 0; $i < $argv[1]; ++$i) {
26
-    $publisher->publish('event #'.$i, '', ['test' => 'testValue']);
26
+    $publisher->publish('event #' . $i, '', ['test' => 'testValue']);
27 27
 }
Please login to merge, or discard this patch.
examples/sync-message-sender-pecl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,5 +23,5 @@
 block discarded – undo
23 23
 $publisher = new SyncPublisher($driver, 'xchange');
24 24
 
25 25
 for ($i = 0; $i < $argv[1]; ++$i) {
26
-    echo $publisher->publish('event #'.$i, '', ['test' => 'testValue'])."\n";
26
+    echo $publisher->publish('event #' . $i, '', ['test' => 'testValue']) . "\n";
27 27
 }
Please login to merge, or discard this patch.
examples/sync-message-worker.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
 $logger->pushHandler(new StreamHandler('php://output', 0));
25 25
 
26 26
 $driver = DriverFactory::getDriver([
27
-   'host' => 'default',
28
-   'port' => '5672',
29
-   'user' => 'guest',
30
-   'pwd' => 'guest'
27
+    'host' => 'default',
28
+    'port' => '5672',
29
+    'user' => 'guest',
30
+    'pwd' => 'guest'
31 31
 ]);
32 32
 
33 33
 $handlerBuilder = new HandlerBuilder($driver);
Please login to merge, or discard this patch.