@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | public function listen(): Promise |
72 | 72 | { |
73 | - return call(function () { |
|
73 | + return call(function() { |
|
74 | 74 | $response = yield from $this->request(); |
75 | 75 | |
76 | 76 | return yield $this->resultFactory->build(self::EVENT_NAMESPACE, $response); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function handleClient(Gateway $gateway, Client $client, Request $request, Response $response): Promise |
51 | 51 | { |
52 | - $client->onClose(function (Client $client, int $code, string $reason) use ($gateway) { |
|
52 | + $client->onClose(function(Client $client, int $code, string $reason) use ($gateway) { |
|
53 | 53 | $this->logger->info( |
54 | 54 | \sprintf( |
55 | 55 | 'Client %d disconnected. Code: %d Reason: %s. Total clients: %d', |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $client->send($this->lastEvents->jsonEncode()); |
74 | 74 | } |
75 | 75 | |
76 | - return call(function () use ($gateway, $client): \Generator { |
|
76 | + return call(function() use ($gateway, $client): \Generator { |
|
77 | 77 | while ($message = yield $client->receive()) { |
78 | 78 | // intentionally keep receiving, otherwise the connection closes instantly for some reason |
79 | 79 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | $this->gateway = $gateway; |
102 | 102 | |
103 | - asyncCall(function () { |
|
103 | + asyncCall(function() { |
|
104 | 104 | while (true) { |
105 | 105 | $this->emit(yield $this->provider->listen()); |
106 | 106 |
@@ -43,11 +43,11 @@ |
||
43 | 43 | |
44 | 44 | $websocket = new Websocket($clientHandler); |
45 | 45 | |
46 | -Amp\Loop::setErrorHandler(function (Throwable $e) use ($logger) { |
|
46 | +Amp\Loop::setErrorHandler(function(Throwable $e) use ($logger) { |
|
47 | 47 | $logger->emergency('GitAmp blew up', ['exception' => $e]); |
48 | 48 | }); |
49 | 49 | |
50 | -Loop::run(function () use ($websocket, $configuration, $logger): Promise { |
|
50 | +Loop::run(function() use ($websocket, $configuration, $logger): Promise { |
|
51 | 51 | $sockets = [ |
52 | 52 | Server::listen(sprintf('%s:%d', $configuration['expose']['ip'], $configuration['expose']['port'])), |
53 | 53 | ]; |