@@ -44,8 +44,9 @@ |
||
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 | } |
@@ -46,11 +46,13 @@ |
||
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 | } |