Completed
Pull Request — master (#1)
by Daniel
12:19
created
Tests/Queue/QueueTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     protected function getCmobiAMQPChannelMock()
47 47
     {
48
-        $channelMock =  $this->getMockBuilder(CmobiAMQPChannel::class)
48
+        $channelMock = $this->getMockBuilder(CmobiAMQPChannel::class)
49 49
             ->disableOriginalConstructor()
50 50
             ->getMock();
51 51
         $channelMock->expects($this->any())
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             ->disableOriginalConstructor()
77 77
             ->getMock();
78 78
         $callbackMock->method('toClosure')
79
-            ->willReturn(function () {});
79
+            ->willReturn(function() {});
80 80
 
81 81
         return $callbackMock;
82 82
     }
Please login to merge, or discard this patch.
Connection/ConnectionManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
     {
21 21
         $factory = $this->getContainer()->get($this->factories['default']);
22 22
 
23
-        if (! is_null($name) && array_key_exists($name, $this->factories)) {
23
+        if (!is_null($name) && array_key_exists($name, $this->factories)) {
24 24
             $factory = $this->getContainer()->get(
25 25
                 $this->factories[$name]
26 26
             );
27 27
         }
28 28
 
29
-        if (! $factory instanceof ConnectionFactory) {
29
+        if (!$factory instanceof ConnectionFactory) {
30 30
             throw new NotFoundAMQPConnectionFactoryException(sprintf('%s: connection not found.', $name));
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Connection/ConnectionFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'],
Please login to merge, or discard this patch.
Queue/Queue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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!');
Please login to merge, or discard this patch.