Passed
Pull Request — master (#17)
by BENOIT
03:48
created
src/Storage/Redis/RedisStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         /** @phpstan-ignore-next-line */
68 68
         return $this->async->keys($keyPattern)
69 69
             ->then(
70
-                function (array $keys) {
70
+                function(array $keys) {
71 71
                     $promises = [];
72 72
                     foreach ($keys as $key) {
73 73
                         $promises[] = $this->async->get($key); /** @phpstan-ignore-line */
Please login to merge, or discard this patch.
src/Storage/PHP/PHPStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
     public function findSubscriptionsBySubscriber(string $subscriber): PromiseInterface
63 63
     {
64
-        return resolve((function (string $subscriber) {
64
+        return resolve((function(string $subscriber) {
65 65
             foreach ($this->subscriptions as $subscription) {
66 66
                 if ($subscription->getSubscriber() === $subscriber) {
67 67
                     yield $subscription;
Please login to merge, or discard this patch.
src/Hub/Hub.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
         $localAddress = $this->config[Configuration::ADDR];
86 86
         $this->shutdownSignal = null;
87 87
         $this->metricsHandler->resetUsers($localAddress);
88
-        $this->loop->addSignal(SIGINT, function ($signal) {
88
+        $this->loop->addSignal(SIGINT, function($signal) {
89 89
             $this->stop($signal, $this->loop);
90 90
         });
91 91
         $this->loop->addPeriodicTimer(
92 92
             15,
93 93
             fn() => $this->metricsHandler->getNbUsers()->then(
94
-                function (int $nbUsers) {
94
+                function(int $nbUsers) {
95 95
                     $memory = \memory_get_usage(true) / 1024 / 1024;
96 96
                     $this->logger()->debug("Users: {$nbUsers} - Memory: {$memory}MB");
97 97
                 }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         return $this->transport->publish($topic, $message)
144 144
             ->then(fn() => $this->storage->storeMessage($topic, $message))
145 145
             ->then(
146
-                function () use ($topic, $message) {
146
+                function() use ($topic, $message) {
147 147
                     $this->logger()->debug(\sprintf('Created message %s on topic %s', $message->getId(), $topic));
148 148
                 }
149 149
             );
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     {
154 154
         return $this->storage->storeSubscriptions($subscriptions)
155 155
             ->then(
156
-                function () use ($subscriptions) {
156
+                function() use ($subscriptions) {
157 157
                     $promises = [];
158 158
                     foreach ($subscriptions as $subscription) {
159 159
                         $promises[] = $this->transport->publish(
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     private function createSocketConnection(string $localAddress, LoopInterface $loop): Socket\Server
184 184
     {
185 185
         $socket = new Socket\Server($localAddress, $loop);
186
-        $socket->on('connection', function (ConnectionInterface $connection) use ($localAddress) {
186
+        $socket->on('connection', function(ConnectionInterface $connection) use ($localAddress) {
187 187
             $this->metricsHandler->incrementUsers($localAddress);
188 188
             $connection->on('close', fn() => $this->handleClosingConnection($connection, $localAddress));
189 189
         });
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     private function stop(int $signal, LoopInterface $loop): void
240 240
     {
241 241
         $this->shutdownSignal = $signal;
242
-        $loop->futureTick(function () use ($loop) {
242
+        $loop->futureTick(function() use ($loop) {
243 243
             $loop->stop();
244 244
         });
245 245
     }
Please login to merge, or discard this patch.