Passed
Push — master ( 84d202...03be53 )
by BENOIT
01:44
created
src/Hub/Hub.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.