@@ -43,13 +43,13 @@ |
||
43 | 43 | /** @phpstan-ignore-next-line */ |
44 | 44 | return $this->client->keys('users:*') |
45 | 45 | ->then( |
46 | - function (array $keys) { |
|
46 | + function(array $keys) { |
|
47 | 47 | $promises = []; |
48 | 48 | foreach ($keys as $key) { |
49 | 49 | $promises[] = $this->client->get($key); /** @phpstan-ignore-line */ |
50 | 50 | } |
51 | 51 | |
52 | - return all($promises)->then(fn (array $results): int => \array_sum($results)); |
|
52 | + return all($promises)->then(fn(array $results): int => \array_sum($results)); |
|
53 | 53 | } |
54 | 54 | ); |
55 | 55 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $loop->addPeriodicTimer( |
49 | 49 | 15, |
50 | 50 | fn() => $this->metricsHandler->getNbUsers()->then( |
51 | - function (int $nbUsers) { |
|
51 | + function(int $nbUsers) { |
|
52 | 52 | $memory = \memory_get_usage(true) / 1024 / 1024; |
53 | 53 | $this->logger()->debug("Users: {$nbUsers} - Memory: {$memory}MB"); |
54 | 54 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ); |
57 | 57 | $socket->on( |
58 | 58 | 'connection', |
59 | - function (Socket\ConnectionInterface $connection) use ($localAddress) { |
|
59 | + function(Socket\ConnectionInterface $connection) use ($localAddress) { |
|
60 | 60 | $this->metricsHandler->incrementUsers($localAddress); |
61 | 61 | $connection->on('close', fn() => $this->metricsHandler->decrementUsers($localAddress)); |
62 | 62 | } |