Passed
Push — master ( 48d05f...3266a4 )
by Mohammad
08:38
created
src/Traits/WebSocketMessagesManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     /**
23 23
      * @param $request
24 24
      * @param ConnectionInterface $from
25
-     * @param $error
25
+     * @param string $error
26 26
      * @throws WebSocketException
27 27
      */
28 28
     function error($request,ConnectionInterface $from, $error)
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,11 +46,13 @@
 block discarded – undo
46 46
      */
47 47
     function sendToWebSocketUser(ConnectionInterface $conn,$data)
48 48
     {
49
-        if(!is_array($data))
50
-            $data = ['msg'=>$data];
49
+        if(!is_array($data)) {
50
+                    $data = ['msg'=>$data];
51
+        }
51 52
 
52
-        if(isset($this->route) && $this->route->auth && !array_key_exists('sender',$data))
53
-            $data['sender'] = $this->getSenderData();
53
+        if(isset($this->route) && $this->route->auth && !array_key_exists('sender',$data)) {
54
+                    $data['sender'] = $this->getSenderData();
55
+        }
54 56
 
55 57
         $conn->send(json_encode($data));
56 58
     }
Please login to merge, or discard this patch.
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/Receiver.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
     /**
142 142
      * @param $msg
143
-     * @param $from
143
+     * @param ConnectionInterface $from
144 144
      * @throws WebSocketException
145 145
      */
146 146
     function checkForRequiredInMessage($msg, $from)
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     }
156 156
 
157 157
     /**
158
-     * @param $clonedObject
158
+     * @param Receiver $clonedObject
159 159
      * @param $clone
160 160
      */
161 161
     function cloneProperties($clonedObject, $clone)
Please login to merge, or discard this patch.