Passed
Push — master ( 47f014...eb9c5f )
by Mohammad
03:53
created
src/Commands/WebSocketService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                     new Receiver()
54 54
                 )
55 55
             ),
56
-            env('CHAT_PORT',8080)
56
+            env('CHAT_PORT', 8080)
57 57
         );
58 58
 
59 59
         $server->run();
Please login to merge, or discard this patch.
src/Facades/WsRoute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 class WsRoute extends \Illuminate\Support\Facades\Facade
12 12
 {
13
-    static function getFacadeAccessor(){
13
+    static function getFacadeAccessor() {
14 14
 
15 15
         return 'WsRoute';
16 16
     }
Please login to merge, or discard this patch.
src/Objects/Rooms/Room.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     function hasMember($client)
46 46
     {
47
-        if(array_key_exists($client->id,$this->members))
47
+        if (array_key_exists($client->id, $this->members))
48 48
             return true;
49 49
 
50 50
         return false;
Please login to merge, or discard this patch.
src/Routes/Routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      * @param $method
25 25
      * @param bool $authenticated
26 26
      */
27
-    function make($routeName, $controller, $method,$authenticated = true)
27
+    function make($routeName, $controller, $method, $authenticated = true)
28 28
     {
29 29
         $this->routes[$routeName] = (object) [
30 30
             'controller'=>$controller,
Please login to merge, or discard this patch.
src/Traits/Validation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
     {
20 20
         foreach ($required as $input)
21 21
         {
22
-            if(!in_array($input,(array)$this->request))
22
+            if (!in_array($input, (array) $this->request))
23 23
             {
24
-                $this->error($this->request,$this->conn,$this->requireErrorMessage($input));
24
+                $this->error($this->request, $this->conn, $this->requireErrorMessage($input));
25 25
             }
26 26
         }
27 27
     }
Please login to merge, or discard this patch.
src/Controllers/WebSocketController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  */
23 23
 class WebSocketController
24 24
 {
25
-    use WebSocketMessagesManager,Validation;
25
+    use WebSocketMessagesManager, Validation;
26 26
 
27 27
     /**
28 28
      * @var Client[]
Please login to merge, or discard this patch.
src/Controllers/RoomController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
      */
21 21
     function enterRoom()
22 22
     {
23
-        $this->validate($this->request,[
23
+        $this->validate($this->request, [
24 24
             'room_id'=>'required'
25 25
         ]);
26
-        $room_id =$this->request->room_id;
26
+        $room_id = $this->request->room_id;
27 27
 
28
-        $this->validateRoom($room_id,true);
28
+        $this->validateRoom($room_id, true);
29 29
 
30 30
         $this->addMember($room_id);
31 31
     }
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     function exitRoom()
37 37
     {
38 38
 
39
-        $this->validate($this->request,[
39
+        $this->validate($this->request, [
40 40
             'room_id'=>'required'
41 41
         ]);
42
-        $room_id =$this->request->room_id;
42
+        $room_id = $this->request->room_id;
43 43
 
44 44
         $this->validateRoom($room_id);
45 45
 
Please login to merge, or discard this patch.
src/Controllers/ChatController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,15 +20,15 @@  discard block
 block discarded – undo
20 20
      */
21 21
     function sendMessageToUser()
22 22
     {
23
-        $this->validate($this->request,[
23
+        $this->validate($this->request, [
24 24
             'user_id'=>'required',
25 25
             'message' => 'required'
26 26
         ]);
27 27
 
28 28
         $user_id = $this->request->user_id;
29
-        $data = ['message'=>$this->request->message,'event'=>'sendToUser'];
29
+        $data = ['message'=>$this->request->message, 'event'=>'sendToUser'];
30 30
 
31
-        $this->sendToUser($user_id,$data);
31
+        $this->sendToUser($user_id, $data);
32 32
     }
33 33
 
34 34
     /**
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
      */
37 37
     function sendMessageToRoom()
38 38
     {
39
-        $this->validate($this->request,[
39
+        $this->validate($this->request, [
40 40
             'room_id'=>'required',
41 41
             'message' => 'required'
42 42
         ]);
43 43
         $room_id = $this->request->room_id;
44
-        $data = ['message'=>$this->request->message,'event'=>'sendToRoom'];
45
-        $this->sendToRoom($room_id,$data);
44
+        $data = ['message'=>$this->request->message, 'event'=>'sendToRoom'];
45
+        $this->sendToRoom($room_id, $data);
46 46
     }
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
src/Controllers/InitializeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
     function index()
19 19
     {
20 20
         echo 'Initializing ..';
21
-        $this->sendBack(['message'=>'WebSocket Initialized','event'=>'initialize']);
21
+        $this->sendBack(['message'=>'WebSocket Initialized', 'event'=>'initialize']);
22 22
     }
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.