Completed
Pull Request — master (#1)
by Daniel
12:19
created
Transport/Rpc/RpcClient.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function onResponse(AMQPMessage $rep)
32 32
     {
33
-        if($rep->get('correlation_id') === $this->correlationId) {
33
+        if ($rep->get('correlation_id') === $this->correlationId) {
34 34
             $this->response = $rep->getBody();
35 35
         }
36 36
     }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $connection = $this->connectionManager->getConnection();
45 45
 
46
-        if (! $connection->isConnected()) {
46
+        if (!$connection->isConnected()) {
47 47
             $connection->reconnect();
48 48
         }
49 49
         $this->channel = $connection->channel();
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $queueBag->setArguments([
67 67
             'x-expires' => ['I', $expire]
68 68
         ]);
69
-        list($callbackQueue, ,) = $this->getChannel()->queueDeclare($queueBag->getQueueDeclare());
69
+        list($callbackQueue,,) = $this->getChannel()->queueDeclare($queueBag->getQueueDeclare());
70 70
         $this->callbackQueue = $callbackQueue;
71 71
         $consumeQueueBag = new RpcQueueBag($callbackQueue);
72 72
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         );
85 85
         $this->getChannel()->basic_publish($msg, '', $this->getQueueName());
86 86
 
87
-        while(! $this->response) {
87
+        while (!$this->response) {
88 88
             $this->getChannel()->wait(null, 0, ($expire / 1000));
89 89
         }
90 90
         $this->getChannel()->close();
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     /** @return string */
137 137
     public function generateCorrelationId()
138 138
     {
139
-        return uniqid($this->getQueueName()) . microtime();
139
+        return uniqid($this->getQueueName()).microtime();
140 140
     }
141 141
 
142 142
     /**
Please login to merge, or discard this patch.
Transport/Rpc/RpcQueueCallback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function toClosure()
31 31
     {
32
-        return function (AMQPMessage $message) {
32
+        return function(AMQPMessage $message) {
33 33
             $response = $this->getQueueService()->handle($message);
34 34
 
35 35
             $amqpResponse = new CmobiAMQPMessage(
Please login to merge, or discard this patch.
Transport/PubSub/SubscriberQueueCallback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function toClosure()
30 30
     {
31
-        return function (AMQPMessage $message) {
31
+        return function(AMQPMessage $message) {
32 32
             $this->getQueueService()->handle($message);
33 33
         };
34 34
     }
Please login to merge, or discard this patch.
Transport/PubSub/Publisher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         /** @var CmobiAMQPConnectionInterface $connection */
59 59
         $connection = $this->connectionManager->getConnection();
60 60
 
61
-        if (! $connection->isConnected()) {
61
+        if (!$connection->isConnected()) {
62 62
             $connection->reconnect();
63 63
         }
64 64
         $this->channel = $connection->channel();
Please login to merge, or discard this patch.
Transport/PubSub/ExchangeType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
 class ExchangeType
6 6
 {
7 7
     const FANOUT = 'fanout';
8
-    const DIRECT  = 'direct';
8
+    const DIRECT = 'direct';
9 9
     const TOPIC = 'topic';
10 10
 }
11 11
\ No newline at end of file
Please login to merge, or discard this patch.
Transport/Worker/Task.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
         /** @var CmobiAMQPConnectionInterface $connection */
55 55
         $connection = $this->connectionManager->getConnection();
56 56
 
57
-        if (! $connection->isConnected()) {
57
+        if (!$connection->isConnected()) {
58 58
             $connection->reconnect();
59 59
         }
60 60
         $this->channel = $connection->channel();
Please login to merge, or discard this patch.
Transport/Worker/WorkerQueueCallback.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function toClosure()
30 30
     {
31
-        return function (AMQPMessage $message) {
31
+        return function(AMQPMessage $message) {
32 32
             $this->getQueueService()->handle($message);
33 33
 
34 34
             $message->delivery_info['channel']->basic_ack($message->delivery_info['delivery_tag']);
Please login to merge, or discard this patch.
Tests/Transport/Rpc/RpcServerBuilderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             ->disableOriginalConstructor()
49 49
             ->getMock();
50 50
 
51
-        $channelMock =  $this->getMockBuilder(CmobiAMQPChannel::class)
51
+        $channelMock = $this->getMockBuilder(CmobiAMQPChannel::class)
52 52
             ->disableOriginalConstructor()
53 53
             ->getMock();
54 54
         $channelMock->expects($this->any())
Please login to merge, or discard this patch.
Tests/Transport/PubSub/SubscriberBuilderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
             ->disableOriginalConstructor()
77 77
             ->getMock();
78 78
 
79
-        $channelMock =  $this->getMockBuilder(CmobiAMQPChannel::class)
79
+        $channelMock = $this->getMockBuilder(CmobiAMQPChannel::class)
80 80
             ->disableOriginalConstructor()
81 81
             ->getMock();
82 82
         $channelMock->expects($this->any())
Please login to merge, or discard this patch.