@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function __construct($class, array $parameters) |
| 38 | 38 | { |
| 39 | - if (! is_a($class, AMQPStreamConnection::class, true)) { |
|
| 39 | + if (!is_a($class, AMQPStreamConnection::class, true)) { |
|
| 40 | 40 | throw new InvalidAMQPConnectionClassException('$class not instance of AMQPStreamConnection'); |
| 41 | 41 | } |
| 42 | 42 | $this->class = $class; |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | $this->parameters['user'], |
| 79 | 79 | $this->parameters['password'], |
| 80 | 80 | $this->parameters['vhost'], |
| 81 | - false, // insist |
|
| 81 | + false, // insist |
|
| 82 | 82 | 'AMQPLAIN', // login_method |
| 83 | - null, // login_response |
|
| 84 | - 'en_US', // locale |
|
| 83 | + null, // login_response |
|
| 84 | + 'en_US', // locale |
|
| 85 | 85 | $this->parameters['connection_timeout'], |
| 86 | 86 | $this->parameters['read_write_timeout'], |
| 87 | 87 | $this->parameters['ssl_context'], |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | $this->channel = $this->getConnection()->channel(); |
| 38 | 38 | |
| 39 | - if (! $this->channel instanceof CmobiAMQPChannel) { |
|
| 39 | + if (!$this->channel instanceof CmobiAMQPChannel) { |
|
| 40 | 40 | throw new InvalidAMQPChannelException('Failed get AMQPChannel'); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if ($queueBag->getExchangeDeclare()) { |
| 53 | 53 | $this->getChannel()->exchangeDeclare($queueBag->getExchangeDeclare()); |
| 54 | - list ($queueName, , ) = $this->getChannel()->queueDeclare($queueBag->getQueueDeclare()); |
|
| 54 | + list ($queueName,,) = $this->getChannel()->queueDeclare($queueBag->getQueueDeclare()); |
|
| 55 | 55 | $this->getChannel()->queue_bind($queueName, $queueBag->getExchange()); |
| 56 | 56 | } else { |
| 57 | 57 | $this->getChannel()->queueDeclare($queueBag->getQueueDeclare()); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | $this->createQueue(); |
| 68 | 68 | |
| 69 | - while(count($this->getChannel()->callbacks)) { |
|
| 69 | + while (count($this->getChannel()->callbacks)) { |
|
| 70 | 70 | try { |
| 71 | 71 | $this->getChannel()->wait(); |
| 72 | 72 | } catch (\Exception $e) { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } catch (\Exception $e) { |
| 141 | 141 | $failed = true; |
| 142 | 142 | sleep(3); |
| 143 | - $this->logger->error('forceReconnect() - ' . $e->getMessage()); |
|
| 143 | + $this->logger->error('forceReconnect() - '.$e->getMessage()); |
|
| 144 | 144 | } |
| 145 | 145 | } while ($failed); |
| 146 | 146 | $this->logger->warning('forceReconnect() - connected!'); |