Passed
Push — master ( 1b6703...425d4d )
by Mohammad
04:36
created
src/Objects/Rooms/Room.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@
 block discarded – undo
44 44
 
45 45
     function hasMember($client)
46 46
     {
47
-        if(array_key_exists($client->id,$this->members))
48
-            return true;
47
+        if(array_key_exists($client->id,$this->members)) {
48
+                    return true;
49
+        }
49 50
 
50 51
         return false;
51 52
     }
Please login to merge, or discard this patch.
src/Traits/WebSocketMessagesManager.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,16 +49,18 @@
 block discarded – undo
49 49
      */
50 50
     function sendToWebSocketUser(ConnectionInterface $conn,$data)
51 51
     {
52
-        if(!is_array($data))
53
-            $data = ['msg'=>$data,'event'=>'default'];
52
+        if(!is_array($data)) {
53
+                    $data = ['msg'=>$data,'event'=>'default'];
54
+        }
54 55
 
55 56
         if(!isset($data['event']))
56 57
         {
57 58
             $data['event'] = 'default';
58 59
         }
59 60
 
60
-        if(isset($this->route) && !array_key_exists('sender',$data))
61
-            $data['sender'] = $this->getSenderData();
61
+        if(isset($this->route) && !array_key_exists('sender',$data)) {
62
+                    $data['sender'] = $this->getSenderData();
63
+        }
62 64
 
63 65
         $conn->send(json_encode($data));
64 66
     }
Please login to merge, or discard this patch.
src/Requests/WsRequest.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 
15 15
     public function __get($property)
16 16
     {
17
-        if($this->has($property))
18
-            return $this->get($property);
17
+        if($this->has($property)) {
18
+                    return $this->get($property);
19
+        }
19 20
 
20 21
         return Parent::get($property);
21 22
     }
Please login to merge, or discard this patch.
src/Receiver.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -242,8 +242,7 @@
 block discarded – undo
242 242
             $this->clients[$from->resourceId]->id = \Auth::id();
243 243
             $this->clients[$from->resourceId]->session = $msg['session'];
244 244
             $this->userAuthSocketMapper[\Auth::id()] = $from->resourceId;
245
-        }
246
-        else
245
+        } else
247 246
         {
248 247
             $this->error($msg, $from, 'Unauthenticated.');
249 248
         }
Please login to merge, or discard this patch.
src/Traits/Validation.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,9 @@
 block discarded – undo
50 50
     public function validate($request, array $rules,
51 51
                              array $messages = [], array $customAttributes = [])
52 52
     {
53
-        if($request instanceof Collection)
54
-            $request = $request->toArray();
53
+        if($request instanceof Collection) {
54
+                    $request = $request->toArray();
55
+        }
55 56
 
56 57
         return $this->getValidationFactory()->make(
57 58
             (array) $request, $rules, $messages, $customAttributes
Please login to merge, or discard this patch.