| @@ -49,8 +49,8 @@ discard block | ||
| 49 | 49 | |
| 50 | 50 | public function handleClient(Gateway $gateway, Client $client, Request $request, Response $response): Promise | 
| 51 | 51 |      { | 
| 52 | -        return call(function () use ($gateway, $client, $request, $response) { | |
| 53 | -            $client->onClose(function (Client $client, int $code, string $reason) use ($gateway) { | |
| 52 | +        return call(function() use ($gateway, $client, $request, $response) { | |
| 53 | +            $client->onClose(function(Client $client, int $code, string $reason) use ($gateway) { | |
| 54 | 54 | yield $this->processDisconnectingClient($gateway, $client, $code, $reason); | 
| 55 | 55 | }); | 
| 56 | 56 | |
| @@ -70,7 +70,7 @@ discard block | ||
| 70 | 70 | |
| 71 | 71 | private function processDisconnectingClient(Gateway $gateway, Client $client, int $code, string $reason): Promise | 
| 72 | 72 |      { | 
| 73 | -        return call(function () use ($gateway, $client, $code, $reason) { | |
| 73 | +        return call(function() use ($gateway, $client, $code, $reason) { | |
| 74 | 74 | $this->logger->info( | 
| 75 | 75 | \sprintf( | 
| 76 | 76 | 'Client %d disconnected. Code: %d Reason: %s. Total clients: %d', | 
| @@ -105,7 +105,7 @@ discard block | ||
| 105 | 105 |      { | 
| 106 | 106 | $this->gateway = $gateway; | 
| 107 | 107 | |
| 108 | -        asyncCall(function () { | |
| 108 | +        asyncCall(function() { | |
| 109 | 109 |              while (true) { | 
| 110 | 110 | $this->emit(yield $this->provider->listen()); | 
| 111 | 111 | |
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | */ | 
| 30 | 30 | public function appendResponse(string $eventNamespace, Response $response): Promise | 
| 31 | 31 |      { | 
| 32 | -        return call(function () use ($eventNamespace, $response) { | |
| 32 | +        return call(function() use ($eventNamespace, $response) { | |
| 33 | 33 |              try { | 
| 34 | 34 | $bufferedResponse = yield $response->getBody()->buffer(); | 
| 35 | 35 | |
| @@ -12,12 +12,12 @@ | ||
| 12 | 12 | |
| 13 | 13 | $logger = (new LoggerFactory())->build($configuration->getLogLevel()); | 
| 14 | 14 | |
| 15 | -Loop::setErrorHandler(function (\Throwable $e) use ($logger): void { | |
| 15 | +Loop::setErrorHandler(function(\Throwable $e) use ($logger): void { | |
| 16 | 16 |      $logger->emergency('GitAmp blew up', ['exception' => $e]); | 
| 17 | 17 | }); | 
| 18 | 18 | |
| 19 | 19 | $server = new Server($logger, $configuration); | 
| 20 | 20 | |
| 21 | -Loop::run(function () use ($server) { | |
| 21 | +Loop::run(function() use ($server) { | |
| 22 | 22 | yield $server->start(); | 
| 23 | 23 | }); | 
| @@ -42,12 +42,12 @@ | ||
| 42 | 42 | private function getSockets(): array | 
| 43 | 43 |      { | 
| 44 | 44 | $sockets = array_map( | 
| 45 | - fn (ServerAddress $address) => SocketServer::listen($address->getUri()), | |
| 45 | + fn(ServerAddress $address) => SocketServer::listen($address->getUri()), | |
| 46 | 46 | $this->configuration->getServerAddresses(), | 
| 47 | 47 | ); | 
| 48 | 48 | |
| 49 | 49 | $sockets = array_merge($sockets, array_map( | 
| 50 | - fn (SslServerAddress $address) => SocketServer::listen( | |
| 50 | + fn(SslServerAddress $address) => SocketServer::listen( | |
| 51 | 51 | $address->getUri(), | 
| 52 | 52 | (new BindContext()) | 
| 53 | 53 | ->withTlsContext((new ServerTlsContext())->withDefaultCertificate($address->getCertificate())), | 
| @@ -42,7 +42,7 @@ discard block | ||
| 42 | 42 | |
| 43 | 43 | private function request(): Promise | 
| 44 | 44 |      { | 
| 45 | -        return call(function () { | |
| 45 | +        return call(function() { | |
| 46 | 46 |              try { | 
| 47 | 47 | $request = new Request(self::API_ENDPOINT, 'GET'); | 
| 48 | 48 | |
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | |
| 75 | 75 | public function listen(): Promise | 
| 76 | 76 |      { | 
| 77 | -        return call(function () { | |
| 77 | +        return call(function() { | |
| 78 | 78 | $response = yield $this->request(); | 
| 79 | 79 | |
| 80 | 80 | return yield $this->resultFactory->buildFromResponse(self::EVENT_NAMESPACE, $response); |