Passed
Branch master (4537c2)
by Shiyu
02:15
created
Category
src/APIs/AgentServiceRegister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function result()
58 58
     {
59
-        return $this->simpleHCodeResult()->then(function (Result $result) {
59
+        return $this->simpleHCodeResult()->then(function(Result $result) {
60 60
             return $this->service->registered($this->agent(), $this->assigned(), $result);
61 61
         });
62 62
     }
Please login to merge, or discard this patch.
src/APIs/AbstractGate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             return Promise::resolved($this->assigned);
113 113
         }
114 114
 
115
-        DNS::resolve($this->agent->host())->then(function (Result $result) {
115
+        DNS::resolve($this->agent->host())->then(function(Result $result) {
116 116
             return $this->assigned = new Agent($result->random(), $this->agent->port());
117 117
         })->sync($resolving = Promise::deferred());
118 118
 
@@ -182,14 +182,14 @@  discard block
 block discarded – undo
182 182
     {
183 183
         $this->assigning()->sync($resolved = Promise::deferred());
184 184
 
185
-        return $resolved->then(function (Agent $agent) use ($canceller) {
185
+        return $resolved->then(function(Agent $agent) use ($canceller) {
186 186
             $request = new Request(
187 187
                 $this->method,
188 188
                 new Uri(
189 189
                     self::SCHEME,
190 190
                     $agent->host(),
191 191
                     $agent->port(),
192
-                    sprintf("/%s", self::VERSION) . $this->uri,
192
+                    sprintf("/%s", self::VERSION).$this->uri,
193 193
                     $this->query
194 194
                 ),
195 195
                 [
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
      */
208 208
     final protected function simpleHCodeResult()
209 209
     {
210
-        return $this->perform()->then(static function (Response $response) {
210
+        return $this->perform()->then(static function(Response $response) {
211 211
             return
212 212
                 $response->getStatusCode() === 200
213 213
                     ? new Success
214
-                    : new Failed((string)$response->getBody())
214
+                    : new Failed((string) $response->getBody())
215 215
                 ;
216 216
         });
217 217
     }
Please login to merge, or discard this patch.
src/APIs/AgentServiceDeregister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public function result()
49 49
     {
50
-        return $this->simpleHCodeResult()->then(function (Result $result) {
50
+        return $this->simpleHCodeResult()->then(function(Result $result) {
51 51
             return $this->service->deregistered($result);
52 52
         });
53 53
     }
Please login to merge, or discard this patch.
src/APIs/AbstractEndpointsLister.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function result()
47 47
     {
48
-        return $this->perform($this->getCanceller())->then(function (Response $response) {
48
+        return $this->perform($this->getCanceller())->then(function(Response $response) {
49 49
             if ($response->getStatusCode() !== 200) {
50 50
                 goto DO_WAIT;
51 51
             }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $this->setVIndex($this->service->getVersion());
59 59
 
60 60
             // new endpoints
61
-            $endpoints = $this->decodeResponse((string)$response->getBody());
61
+            $endpoints = $this->decodeResponse((string) $response->getBody());
62 62
             foreach ($endpoints as $endpoint) {
63 63
                 list($id, $name, $host, $port, $tags) = $this->genInfo($endpoint);
64 64
                 $this->service->addEndpoint(
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             DO_WAIT:
78 78
 
79 79
             // make sleep if no versions
80
-            return msleep(rand(...$this->emptyWait), function () {
80
+            return msleep(rand(...$this->emptyWait), function() {
81 81
                 return $this->service;
82 82
             });
83 83
         });
Please login to merge, or discard this patch.
src/Types/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
      */
29 29
     final public function failed() : bool
30 30
     {
31
-        return ! $this->success;
31
+        return !$this->success;
32 32
     }
33 33
 }
Please login to merge, or discard this patch.