Passed
Pull Request — master (#17)
by BENOIT
02:04
created
src/Helpers/RedisHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         /** @phpstan-ignore-next-line */
14 14
         $client->get('foo')->then(
15 15
             null,
16
-            function (\Exception $e) use ($loop, $logger) {
16
+            function(\Exception $e) use ($loop, $logger) {
17 17
                 $logger->error(\sprintf('Redis error: %s', $e->getMessage()));
18 18
                 $loop->stop();
19 19
             }
Please login to merge, or discard this patch.
src/Transport/Redis/RedisTransport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $this->subscriber->subscribe($topicSelector);
47 47
         $this->subscriber->on(
48 48
             'message',
49
-            function (string $topic, string $payload) use ($topicSelector, $callback) {
49
+            function(string $topic, string $payload) use ($topicSelector, $callback) {
50 50
                 $this->dispatch($topic, $payload, $topicSelector, $callback);
51 51
             }
52 52
         );
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $this->subscriber->psubscribe($channel);
75 75
         $this->subscriber->on(
76 76
             'pmessage',
77
-            function (string $pattern, string $topic, string $payload) use ($topicSelector, $callback) {
77
+            function(string $pattern, string $topic, string $payload) use ($topicSelector, $callback) {
78 78
                 $this->dispatch($topic, $payload, $topicSelector, $callback);
79 79
             }
80 80
         );
Please login to merge, or discard this patch.
src/Transport/PHP/PHPTransport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function subscribe(string $subscribedTopic, callable $callback): PromiseInterface
30 30
     {
31
-        $this->emitter->on('message', function (string $topic, Message $message) use ($callback, $subscribedTopic) {
31
+        $this->emitter->on('message', function(string $topic, Message $message) use ($callback, $subscribedTopic) {
32 32
             if (!TopicMatcher::matchesTopicSelectors($topic, [$subscribedTopic])) {
33 33
                 return;
34 34
             }
Please login to merge, or discard this patch.
src/Metrics/Redis/RedisMetricsHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Command/StressSubscribersCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         $url = $url->withQuery($qs);
64 64
         $nbSubscribers = (int) $input->getOption('subscribers');
65 65
 
66
-        $requests = function (HttpClientInterface $client, string $url) use ($nbSubscribers) {
66
+        $requests = function(HttpClientInterface $client, string $url) use ($nbSubscribers) {
67 67
             for ($i = 0; $i < $nbSubscribers; $i++) {
68 68
                 yield $client->request('GET', $url);
69 69
             }
Please login to merge, or discard this patch.
src/Storage/Redis/RedisStorageFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
         $promises = [
39 39
             'async' => $factory->createClient($dsn)
40 40
                 ->then(
41
-                    function (AsynchronousClient $client) {
41
+                    function(AsynchronousClient $client) {
42 42
                         $client->on(
43 43
                             'close',
44
-                            function () {
44
+                            function() {
45 45
                                 $this->logger()->error('Connection closed.');
46 46
                                 $this->loop->stop();
47 47
                             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
                         return $client;
51 51
                     },
52
-                    function (\Exception $exception) {
52
+                    function(\Exception $exception) {
53 53
                         $this->loop->stop();
54 54
                         $this->logger()->error($exception->getMessage());
55 55
                     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         return all($promises)
61 61
             ->then(
62
-                function (iterable $results): array {
62
+                function(iterable $results): array {
63 63
                     $clients = [];
64 64
                     foreach ($results as $key => $client) {
65 65
                         $clients[$key] = $client;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 }
73 73
             )
74 74
             ->then(
75
-                fn (array $clients): RedisStorage => new RedisStorage(
75
+                fn(array $clients): RedisStorage => new RedisStorage(
76 76
                     $clients['async'],
77 77
                     $clients['sync'],
78 78
                 )
Please login to merge, or discard this patch.
src/Transport/Redis/RedisTransportFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
         $promises = [
37 37
             'subscriber' => $factory->createClient($dsn)
38 38
                 ->then(
39
-                    function (AsynchronousClient $client) {
39
+                    function(AsynchronousClient $client) {
40 40
                         $client->on(
41 41
                             'close',
42
-                            function () {
42
+                            function() {
43 43
                                 $this->logger()->error('Connection closed.');
44 44
                                 $this->loop->stop();
45 45
                             }
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
 
48 48
                         return $client;
49 49
                     },
50
-                    function (\Exception $exception) {
50
+                    function(\Exception $exception) {
51 51
                         $this->loop->stop();
52 52
                         $this->logger->error($exception->getMessage());
53 53
                     }
54 54
                 ),
55 55
             'publisher' => $factory->createClient($dsn)
56 56
                 ->then(
57
-                    function (AsynchronousClient $client) {
57
+                    function(AsynchronousClient $client) {
58 58
                         $client->on(
59 59
                             'close',
60
-                            function () {
60
+                            function() {
61 61
                                 $this->logger()->error('Connection closed.');
62 62
                                 $this->loop->stop();
63 63
                             }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
                         return $client;
67 67
                     },
68
-                    function (\Exception $exception) {
68
+                    function(\Exception $exception) {
69 69
                         $this->loop->stop();
70 70
                         $this->logger()->error($exception->getMessage());
71 71
                     }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         return all($promises)
76 76
             ->then(
77
-                function (iterable $results): array {
77
+                function(iterable $results): array {
78 78
                     $clients = [];
79 79
                     foreach ($results as $key => $client) {
80 80
                         $clients[$key] = $client;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 }
88 88
             )
89 89
             ->then(
90
-                fn (array $clients) => new RedisTransport($clients['subscriber'], $clients['publisher'])
90
+                fn(array $clients) => new RedisTransport($clients['subscriber'], $clients['publisher'])
91 91
             );
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
src/Metrics/Redis/RedisMetricsHandlerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         $factory = new Factory($this->loop);
34 34
 
35 35
         return $factory->createClient($dsn)
36
-            ->then(fn (AsynchronousClient $client) => new RedisMetricsHandler($client));
36
+            ->then(fn(AsynchronousClient $client) => new RedisMetricsHandler($client));
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
src/Command/GenerateJWTCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
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
                     }
Please login to merge, or discard this patch.