@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $connection = $this->connectionManager->getConnection($this->connectionName); |
56 | 56 | $channel = $connection->channel(); |
57 | 57 | |
58 | - if (! $this->queueHasExists($channel)) { |
|
58 | + if (!$this->queueHasExists($channel)) { |
|
59 | 59 | throw new QueueNotFoundException("Queue $this->queueName not declared."); |
60 | 60 | } |
61 | 61 | $this->correlationId = $this->generateCorrelationId(); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | [$this, 'onResponse'] |
81 | 81 | ); |
82 | 82 | $msg = new CmobiAMQPMessage( |
83 | - (string) $data, |
|
83 | + (string)$data, |
|
84 | 84 | [ |
85 | 85 | 'correlation_id' => $this->correlationId, |
86 | 86 | 'reply_to' => $this->callbackQueue, |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | ); |
90 | 90 | $channel->basic_publish($msg, '', $this->getQueueName()); |
91 | 91 | |
92 | - while (! $this->response) { |
|
92 | + while (!$this->response) { |
|
93 | 93 | $channel->wait(null, 0, ($expire / 1000)); |
94 | 94 | } |
95 | 95 | $channel->close(); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | /** @return string */ |
152 | 152 | public function generateCorrelationId() |
153 | 153 | { |
154 | - return uniqid($this->getQueueName()) . Uuid::uuid4()->toString() . microtime(); |
|
154 | + return uniqid($this->getQueueName()).Uuid::uuid4()->toString().microtime(); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | /** |
@@ -143,17 +143,17 @@ |
||
143 | 143 | do { |
144 | 144 | try { |
145 | 145 | $failed = false; |
146 | - fwrite($this->logOutput, 'start Queue::forceReconnect() - trying connect...' . PHP_EOL); |
|
146 | + fwrite($this->logOutput, 'start Queue::forceReconnect() - trying connect...'.PHP_EOL); |
|
147 | 147 | $this->connection = $this->getConnectionManager()->getConnection($this->connectionName); |
148 | 148 | $this->channel = $this->getConnection()->channel(); |
149 | 149 | $this->createQueue(); |
150 | 150 | } catch (\Exception $e) { |
151 | 151 | $failed = true; |
152 | 152 | sleep(3); |
153 | - fwrite($this->logOutput, 'failed Queue::forceReconnect() - ' . $e->getMessage() . PHP_EOL); |
|
153 | + fwrite($this->logOutput, 'failed Queue::forceReconnect() - '.$e->getMessage().PHP_EOL); |
|
154 | 154 | } |
155 | 155 | } while ($failed); |
156 | - fwrite($this->logOutput, 'Queue::forceReconnect() - connected!' . PHP_EOL); |
|
156 | + fwrite($this->logOutput, 'Queue::forceReconnect() - connected!'.PHP_EOL); |
|
157 | 157 | |
158 | 158 | return $this->channel; |
159 | 159 | } |