Passed
Push — master ( 0f36ee...b3b9d5 )
by Albert
05:07 queued 02:26
created
src/Concerns/InteractsWithWebsocket.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             // enable sandbox
72 72
             $sandbox->enable();
73 73
             // check if socket.io connection established
74
-            if (! $this->websocketHandler->onOpen($swooleRequest->fd, $illuminateRequest)) {
74
+            if (!$this->websocketHandler->onOpen($swooleRequest->fd, $illuminateRequest)) {
75 75
                 return;
76 76
             }
77 77
             // trigger 'connect' websocket event
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             // enable sandbox
110 110
             $sandbox->enable();
111 111
 
112
-            if (! $this->app->make($handler)->handle($swooleRequest, $response)) {
112
+            if (!$this->app->make($handler)->handle($swooleRequest, $response)) {
113 113
                 return false;
114 114
             }
115 115
             // trigger 'connect' websocket event
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function onClose($server, $fd, $reactorId)
177 177
     {
178
-        if (! $this->isServerWebsocket($fd) || ! $server instanceof WebsocketServer) {
178
+        if (!$this->isServerWebsocket($fd) || !$server instanceof WebsocketServer) {
179 179
             return;
180 180
         }
181 181
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function isWebsocketPushPacket($packet)
207 207
     {
208
-        if (! is_array($packet)) {
208
+        if (!is_array($packet)) {
209 209
             return false;
210 210
         }
211 211
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     {
297 297
         $handlerClass = $this->container->make('config')->get('swoole_websocket.handler');
298 298
 
299
-        if (! $handlerClass) {
299
+        if (!$handlerClass) {
300 300
             throw new WebsocketNotSetInConfigException;
301 301
         }
302 302
 
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     protected function bindRoom(): void
359 359
     {
360
-        $this->app->singleton(RoomContract::class, function () {
360
+        $this->app->singleton(RoomContract::class, function() {
361 361
             return $this->websocketRoom;
362 362
         });
363 363
 
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
      */
370 370
     protected function bindWebsocket()
371 371
     {
372
-        $this->app->singleton(Websocket::class, function (Container $app) {
372
+        $this->app->singleton(Websocket::class, function(Container $app) {
373 373
             return new Websocket($app->make(RoomContract::class), new Pipeline($app));
374 374
         });
375 375
 
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $routePath = $this->container->make('config')
385 385
             ->get('swoole_websocket.route_file');
386 386
 
387
-        if (! file_exists($routePath)) {
387
+        if (!file_exists($routePath)) {
388 388
             $routePath = __DIR__ . '/../../routes/websocket.php';
389 389
         }
390 390
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
      */
401 401
     public function isWebsocketPushPayload($payload): bool
402 402
     {
403
-        if (! is_array($payload)) {
403
+        if (!is_array($payload)) {
404 404
             return false;
405 405
         }
406 406
 
Please login to merge, or discard this patch.