@@ -69,7 +69,7 @@ |
||
| 69 | 69 | 'event' => $this->event, |
| 70 | 70 | 'retry' => $this->retry, |
| 71 | 71 | ], |
| 72 | - fn ($value) => null !== $value |
|
| 72 | + fn($value) => null !== $value |
|
| 73 | 73 | ); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -206,7 +206,7 @@ |
||
| 206 | 206 | $value = $io->ask( |
| 207 | 207 | 'TTL of this token in seconds (or hit ENTER for no expiration):', |
| 208 | 208 | null, |
| 209 | - function ($value) { |
|
| 209 | + function($value) { |
|
| 210 | 210 | if (null === $value) { |
| 211 | 211 | return null; |
| 212 | 212 | } |
@@ -50,13 +50,13 @@ discard block |
||
| 50 | 50 | $localAddress = $this->config[Configuration::ADDR]; |
| 51 | 51 | $this->shutdownSignal = null; |
| 52 | 52 | $this->metricsHandler->resetUsers($localAddress); |
| 53 | - $this->loop->addSignal(SIGINT, function ($signal) { |
|
| 53 | + $this->loop->addSignal(SIGINT, function($signal) { |
|
| 54 | 54 | $this->stop($signal, $this->loop); |
| 55 | 55 | }); |
| 56 | 56 | $this->loop->addPeriodicTimer( |
| 57 | 57 | 15, |
| 58 | 58 | fn() => $this->metricsHandler->getNbUsers()->then( |
| 59 | - function (int $nbUsers) { |
|
| 59 | + function(int $nbUsers) { |
|
| 60 | 60 | $memory = \memory_get_usage(true) / 1024 / 1024; |
| 61 | 61 | $this->logger()->debug("Users: {$nbUsers} - Memory: {$memory}MB"); |
| 62 | 62 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | private function createSocketConnection(string $localAddress, LoopInterface $loop): Socket\Server |
| 84 | 84 | { |
| 85 | 85 | $socket = new Socket\Server($localAddress, $loop); |
| 86 | - $socket->on('connection', function (ConnectionInterface $connection) use ($localAddress) { |
|
| 86 | + $socket->on('connection', function(ConnectionInterface $connection) use ($localAddress) { |
|
| 87 | 87 | $this->metricsHandler->incrementUsers($localAddress); |
| 88 | 88 | $connection->on('close', fn() => $this->metricsHandler->decrementUsers($localAddress)); |
| 89 | 89 | }); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | private function stop(int $signal, LoopInterface $loop): void |
| 109 | 109 | { |
| 110 | 110 | $this->shutdownSignal = $signal; |
| 111 | - $loop->futureTick(function () use ($loop) { |
|
| 111 | + $loop->futureTick(function() use ($loop) { |
|
| 112 | 112 | $loop->stop(); |
| 113 | 113 | }); |
| 114 | 114 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | try { |
| 46 | 46 | $config = $this->configuration->overrideWith(without_nullish_values($input->getOptions()))->asArray(); |
| 47 | 47 | $loop->futureTick( |
| 48 | - function () use ($config, $output) { |
|
| 48 | + function() use ($config, $output) { |
|
| 49 | 49 | $this->displayConfiguration($config, $output); |
| 50 | 50 | } |
| 51 | 51 | ); |