Passed
Pull Request — master (#174)
by Fractal
02:42
created
src/Transformers/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
     protected function setIlluminateResponse($illuminateResponse)
144 144
     {
145 145
         if (!$illuminateResponse instanceof SymfonyResponse) {
146
-            $content = (string)$illuminateResponse;
146
+            $content = (string) $illuminateResponse;
147 147
             $illuminateResponse = new IlluminateResponse($content);
148 148
         }
149 149
 
Please login to merge, or discard this patch.
src/Websocket/Middleware/DecryptCookies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function disableFor($name)
58 58
     {
59
-        $this->except = array_merge($this->except, (array)$name);
59
+        $this->except = array_merge($this->except, (array) $name);
60 60
     }
61 61
 
62 62
     /**
Please login to merge, or discard this patch.
src/Websocket/Middleware/StartSession.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     protected function startSession(Request $request)
62 62
     {
63
-        return tap($this->getSession($request), function (Session $session) use ($request) {
63
+        return tap($this->getSession($request), function(Session $session) use ($request) {
64 64
             $session->setRequestOnHandler($request);
65 65
 
66 66
             $session->start();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function getSession(Request $request)
78 78
     {
79
-        return tap($this->manager->driver(), function (Session $session) use ($request) {
79
+        return tap($this->manager->driver(), function(Session $session) use ($request) {
80 80
             $session->setId($request->cookies->get($session->getName()));
81 81
         });
82 82
     }
Please login to merge, or discard this patch.
src/Websocket/Rooms/RedisRoom.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         $this->checkTable($table);
141 141
         $redisKey = $this->getKey($key, $table);
142 142
 
143
-        $this->redis->pipeline(function (Pipeline $pipe) use ($redisKey, $values) {
143
+        $this->redis->pipeline(function(Pipeline $pipe) use ($redisKey, $values) {
144 144
             foreach ($values as $value) {
145 145
                 $pipe->sadd($redisKey, $value);
146 146
             }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $this->checkTable($table);
164 164
         $redisKey = $this->getKey($key, $table);
165 165
 
166
-        $this->redis->pipeline(function (Pipeline $pipe) use ($redisKey, $values) {
166
+        $this->redis->pipeline(function(Pipeline $pipe) use ($redisKey, $values) {
167 167
             foreach ($values as $value) {
168 168
                 $pipe->srem($redisKey, $value);
169 169
             }
Please login to merge, or discard this patch.
src/Websocket/SocketIO/Packet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
             return null;
120 120
         }
121 121
 
122
-        return (int)$type;
122
+        return (int) $type;
123 123
     }
124 124
 
125 125
     /**
Please login to merge, or discard this patch.
src/Websocket/Websocket.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     protected function getFds()
312 312
     {
313
-        $fds = array_filter($this->to, function ($value) {
313
+        $fds = array_filter($this->to, function($value) {
314 314
             return is_integer($value);
315 315
         });
316 316
         $rooms = array_diff($this->to, $fds);
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     {
388 388
         $pipeline = $this->pipeline;
389 389
 
390
-        $closure = function () use ($container) {
390
+        $closure = function() use ($container) {
391 391
             $this->container = $container;
392 392
         };
393 393
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
         return $this->pipeline
430 430
             ->send($request)
431 431
             ->through($this->middleware)
432
-            ->then(function ($request) {
432
+            ->then(function($request) {
433 433
                 return $request;
434 434
             });
435 435
     }
Please login to merge, or discard this patch.
src/Websocket/Authenticatable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     {
65 65
         $users = is_object($users) ? func_get_args() : $users;
66 66
 
67
-        $userIds = array_map(function (AuthenticatableContract $user) {
67
+        $userIds = array_map(function(AuthenticatableContract $user) {
68 68
             $this->checkUser($user);
69 69
 
70 70
             return $user->getAuthIdentifier();
Please login to merge, or discard this patch.
src/Concerns/InteractsWithWebsocket.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         // push message to designated fds
168 168
         foreach ($push->getDescriptors() as $descriptor) {
169
-            if ($server->exist($descriptor) || !$push->isBroadcastToDescriptor((int)$descriptor)) {
169
+            if ($server->exist($descriptor) || !$push->isBroadcastToDescriptor((int) $descriptor)) {
170 170
                 $server->push($descriptor, $payload, $push->getOpcode());
171 171
             }
172 172
         }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function filterWebsocket(array $descriptors): array
234 234
     {
235
-        $callback = function ($descriptor) {
235
+        $callback = function($descriptor) {
236 236
             return $this->isWebsocket($descriptor);
237 237
         };
238 238
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      */
296 296
     protected function bindRoom(): void
297 297
     {
298
-        $this->app->singleton(RoomContract::class, function (Container $container) {
298
+        $this->app->singleton(RoomContract::class, function(Container $container) {
299 299
             $driver = $container->make('config')->get('swoole_websocket.default');
300 300
             $settings = $container->make('config')->get("swoole_websocket.settings.{$driver}");
301 301
             $className = $container->make('config')->get("swoole_websocket.drivers.{$driver}");
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      */
312 312
     protected function bindWebsocket()
313 313
     {
314
-        $this->app->singleton(Websocket::class, function (Container $app) {
314
+        $this->app->singleton(Websocket::class, function(Container $app) {
315 315
             return new Websocket($app->make('swoole.room'), new Pipeline($app));
316 316
         });
317 317
 
Please login to merge, or discard this patch.
src/Concerns/InteractsWithSwooleTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     protected function bindSwooleTable()
59 59
     {
60 60
         if (!$this->app instanceof ConsoleApp) {
61
-            $this->app->singleton(SwooleTable::class, function () {
61
+            $this->app->singleton(SwooleTable::class, function() {
62 62
                 return $this->table;
63 63
             });
64 64
 
Please login to merge, or discard this patch.