Completed
Push — master ( 4e9b37...0f36ee )
by Albert
13s queued 11s
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
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     {
294 294
         $handlerClass = $this->container->make('config')->get('swoole_websocket.handler');
295 295
 
296
-        if (! $handlerClass) {
296
+        if (!$handlerClass) {
297 297
             throw new WebsocketNotSetInConfigException;
298 298
         }
299 299
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      */
355 355
     protected function bindRoom(): void
356 356
     {
357
-        $this->app->singleton(RoomContract::class, function (Container $app) {
357
+        $this->app->singleton(RoomContract::class, function(Container $app) {
358 358
             return $this->websocketRoom;
359 359
         });
360 360
 
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
      */
367 367
     protected function bindWebsocket()
368 368
     {
369
-        $this->app->singleton(Websocket::class, function (Container $app) {
369
+        $this->app->singleton(Websocket::class, function(Container $app) {
370 370
             return new Websocket($app->make(RoomContract::class), new Pipeline($app));
371 371
         });
372 372
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         $routePath = $this->container->make('config')
382 382
             ->get('swoole_websocket.route_file');
383 383
 
384
-        if (! file_exists($routePath)) {
384
+        if (!file_exists($routePath)) {
385 385
             $routePath = __DIR__ . '/../../routes/websocket.php';
386 386
         }
387 387
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
      */
398 398
     public function isWebsocketPushPayload($payload): bool
399 399
     {
400
-        if (! is_array($payload)) {
400
+        if (!is_array($payload)) {
401 401
             return false;
402 402
         }
403 403
 
Please login to merge, or discard this patch.