Test Failed
Push — master ( f95edb...01c8bf )
by Daniel
03:03
created
Transport/Rpc/RpcClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function createCallbackQueue(CmobiAMQPChannel $channel, $expire, $corralationId = null, $sufix = null)
48 48
     {
49 49
         $this->correlationId = is_null($corralationId) ? $this->generateCorrelationId() : $corralationId;
50
-        $sufix = is_null($sufix) ? Uuid::uuid4()->toString() . microtime() : $sufix;
50
+        $sufix = is_null($sufix) ? Uuid::uuid4()->toString().microtime() : $sufix;
51 51
         $queueBag = new RpcQueueBag(
52 52
             sprintf(
53 53
                 'callback_to_%s_from_%s_%s',
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
         $connection = $this->connectionManager->getConnection($this->connectionName);
85 85
         $channel = $connection->channel();
86 86
 
87
-        if (! $this->queueHasExists($channel)) {
87
+        if (!$this->queueHasExists($channel)) {
88 88
             throw new QueueNotFoundException("Queue $this->queueName not declared.");
89 89
         }
90 90
         $this->createCallbackQueue($channel, $expire);
91 91
         $msg = new CmobiAMQPMessage(
92
-            (string) $data,
92
+            (string)$data,
93 93
             [
94 94
                 'correlation_id' => $this->correlationId,
95 95
                 'reply_to' => $this->callbackQueue,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         );
99 99
         $channel->basic_publish($msg, '', $this->getQueueName());
100 100
 
101
-        while (! $this->response) {
101
+        while (!$this->response) {
102 102
             try {
103 103
                 $channel->wait(null, 0, ($expire / 1000));
104 104
             } catch (\Exception $e) {
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     /** @return string */
169 169
     public function generateCorrelationId()
170 170
     {
171
-        return uniqid($this->getQueueName()) . Uuid::uuid4()->toString() . microtime();
171
+        return uniqid($this->getQueueName()).Uuid::uuid4()->toString().microtime();
172 172
     }
173 173
 
174 174
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
                 $connection->close();
218 218
                 sleep(2);
219 219
                 $failed = false;
220
-                fwrite($this->logOutput, 'start RpcClient::forceReconnect() - trying connect...' . PHP_EOL);
220
+                fwrite($this->logOutput, 'start RpcClient::forceReconnect() - trying connect...'.PHP_EOL);
221 221
                 $connection = $this->getConnectionManager()->getConnection($this->connectionName);
222 222
                 $channel = $connection->channel();
223 223
                 $this->createCallbackQueue($channel, $expire, $corralationId);
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
                 $tries++;
226 226
                 $failed = true;
227 227
                 sleep(3);
228
-                fwrite($this->errOutput, 'failed RpcClient::forceReconnect() - ' . $e->getMessage() . PHP_EOL);
228
+                fwrite($this->errOutput, 'failed RpcClient::forceReconnect() - '.$e->getMessage().PHP_EOL);
229 229
             }
230 230
         } while ($failed || $tries > 2);
231
-        fwrite($this->logOutput, 'RpcClient::forceReconnect() - connected!' . PHP_EOL);
231
+        fwrite($this->logOutput, 'RpcClient::forceReconnect() - connected!'.PHP_EOL);
232 232
 
233 233
         return $connection;
234 234
     }
Please login to merge, or discard this patch.