Passed
Pull Request — master (#174)
by Fractal
02:42
created
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.
src/Commands/HttpServerCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@
 block discarded – undo
289 289
         $path = $this->getPidPath();
290 290
 
291 291
         return $this->pid = file_exists($path)
292
-            ? (int)file_get_contents($path) ?? $this->removePidFile()
292
+            ? (int) file_get_contents($path) ?? $this->removePidFile()
293 293
             : null;
294 294
     }
295 295
 
Please login to merge, or discard this patch.
src/Coroutine/PDOStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             if (!method_exists($variable, '__toString')) {
110 110
                 return false;
111 111
             } else {
112
-                $variable = (string)$variable;
112
+                $variable = (string) $variable;
113 113
             }
114 114
         }
115 115
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 break;
207 207
             case PDO::FETCH_OBJ:
208 208
                 foreach ($rawData as $row) {
209
-                    $resultSet[] = (object)$row;
209
+                    $resultSet[] = (object) $row;
210 210
                 }
211 211
                 break;
212 212
             case PDO::FETCH_NUM:
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         $this->__executeWhenStringQueryEmpty();
228 228
 
229 229
         $cursorOrientation = \is_null($cursorOrientation) ? PDO::FETCH_ORI_NEXT : $cursorOrientation;
230
-        $cursorOffset = \is_null($cursorOffset) ? 0 : (int)$cursorOffset;
230
+        $cursorOffset = \is_null($cursorOffset) ? 0 : (int) $cursorOffset;
231 231
 
232 232
         switch ($cursorOrientation) {
233 233
             case PDO::FETCH_ORI_ABS:
Please login to merge, or discard this patch.
src/Coroutine/PDO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@
 block discarded – undo
253 253
         if (strpos($statement, ':') !== false) {
254 254
             $i = 0;
255 255
             $bindKeyMap = [];
256
-            $statement = preg_replace_callback('/:(\w+)\b/', function ($matches) use (&$i, &$bindKeyMap) {
256
+            $statement = preg_replace_callback('/:(\w+)\b/', function($matches) use (&$i, &$bindKeyMap) {
257 257
                 $bindKeyMap[$matches[1]] = $i++;
258 258
 
259 259
                 return '?';
Please login to merge, or discard this patch.
src/LaravelServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     protected function registerManager()
19 19
     {
20
-        $this->app->singleton('swoole.manager', function ($app) {
20
+        $this->app->singleton('swoole.manager', function($app) {
21 21
             return new Manager($app, 'laravel');
22 22
         });
23 23
     }
Please login to merge, or discard this patch.
src/Server/Sandbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
         } else if ($response instanceof SymfonyResponse) {
230 230
             $content = $response->getContent();
231 231
         } else if (!$isFile = $response instanceof BinaryFileResponse) {
232
-            $content = (string)$response;
232
+            $content = (string) $response;
233 233
         }
234 234
 
235 235
         // process terminating logics
Please login to merge, or discard this patch.
src/Server/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         foreach ($this->events as $event) {
106 106
             $listener = Str::camel("on_$event");
107
-            $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) {
107
+            $callback = method_exists($this, $listener) ? [$this, $listener] : function() use ($event) {
108 108
                 $this->container->make('events')->fire("swoole.$event", func_get_args());
109 109
             };
110 110
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     protected function bindSandbox()
301 301
     {
302
-        $this->app->singleton(Sandbox::class, function ($app) {
302
+        $this->app->singleton(Sandbox::class, function($app) {
303 303
             return new Sandbox($app, $this->framework);
304 304
         });
305 305
 
Please login to merge, or discard this patch.