@@ -29,11 +29,11 @@ |
||
29 | 29 | { |
30 | 30 | $path = $keys === '*' ? $folder : sprintf('%s/%s', $folder, $keys); |
31 | 31 | |
32 | - $ig = function () use ($path) { |
|
32 | + $ig = function() use ($path) { |
|
33 | 33 | return (new KVGetting($this->agent))->path($path); |
34 | 34 | }; |
35 | 35 | |
36 | - $do = function (KVGetting $lister) use ($notify) { |
|
36 | + $do = function(KVGetting $lister) use ($notify) { |
|
37 | 37 | yield $notify->send($this->changed(yield $lister->result())); |
38 | 38 | }; |
39 | 39 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | private function start(int $heartbeat) : void |
58 | 58 | { |
59 | - $this->daemon = Timer::loop($heartbeat * 1000, co(function () { |
|
59 | + $this->daemon = Timer::loop($heartbeat * 1000, co(function() { |
|
60 | 60 | yield $this->updating(); |
61 | 61 | })); |
62 | 62 |
@@ -32,11 +32,11 @@ |
||
32 | 32 | */ |
33 | 33 | public function watching(string $service, Chan $notify) : void |
34 | 34 | { |
35 | - $ig = function () use ($service) { |
|
35 | + $ig = function() use ($service) { |
|
36 | 36 | return $this->endpointsLister($service); |
37 | 37 | }; |
38 | 38 | |
39 | - $do = function (AbstractEndpointsLister $lister) use ($notify) { |
|
39 | + $do = function(AbstractEndpointsLister $lister) use ($notify) { |
|
40 | 40 | yield $notify->send($this->routing(yield $lister->result())); |
41 | 41 | }; |
42 | 42 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | )->setKeepalive($heartbeat) |
47 | 47 | ; |
48 | 48 | |
49 | - async(static function (Agent $agent, Service $service) { |
|
49 | + async(static function(Agent $agent, Service $service) { |
|
50 | 50 | for (;;) { |
51 | 51 | /** |
52 | 52 | * @var Result $registered |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | public function connected() : bool |
52 | 52 | { |
53 | - return !! $this->assignedAgent; |
|
53 | + return !!$this->assignedAgent; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function hasVersion() : bool |
22 | 22 | { |
23 | - return ! is_null($this->versionIDX); |
|
23 | + return !is_null($this->versionIDX); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function deregister() : Promised |
26 | 26 | { |
27 | - return async(function (Service $service) { |
|
27 | + return async(function(Service $service) { |
|
28 | 28 | for (;;) { |
29 | 29 | if (!$service->connected()) { |
30 | 30 | logger('consul')->info('Service has not been registered .. skip', ['svc' => $service->id()]); |
@@ -31,14 +31,14 @@ |
||
31 | 31 | */ |
32 | 32 | protected function nwProcess(Promised $cc, Closure $ig, Closure $do, string $em, array $ec) : void |
33 | 33 | { |
34 | - go(static function () use ($cc, $ig, $do, $em, $ec) { |
|
34 | + go(static function() use ($cc, $ig, $do, $em, $ec) { |
|
35 | 35 | /** |
36 | 36 | * @var Promised $ex |
37 | 37 | */ |
38 | 38 | |
39 | 39 | $ex = null; |
40 | 40 | |
41 | - $cc->then(function () use (&$ex) { |
|
41 | + $cc->then(function() use (&$ex) { |
|
42 | 42 | $ex && $ex->pended() && $ex->resolve(); |
43 | 43 | }); |
44 | 44 |
@@ -47,11 +47,11 @@ |
||
47 | 47 | */ |
48 | 48 | public function result() |
49 | 49 | { |
50 | - return $this->perform($this->getCanceller())->then(function (Response $response) { |
|
50 | + return $this->perform($this->getCanceller())->then(function(Response $response) { |
|
51 | 51 | $kvs = new KVs( |
52 | 52 | $this->path, |
53 | 53 | $response->getStatusCode() === 200 |
54 | - ? $this->decodeResponse((string)$response->getBody()) |
|
54 | + ? $this->decodeResponse((string) $response->getBody()) |
|
55 | 55 | : [] |
56 | 56 | ); |
57 | 57 |