@@ -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 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | function sendBack($data) |
| 74 | 74 | { |
| 75 | - $this->sendToWebSocketUser($this->conn,$data); |
|
| 75 | + $this->sendToWebSocketUser($this->conn,$data); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -49,16 +49,18 @@ |
||
| 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) && $this->route->auth && !array_key_exists('sender',$data)) |
|
| 61 | - $data['sender'] = $this->getSenderData(); |
|
| 61 | + if(isset($this->route) && $this->route->auth && !array_key_exists('sender',$data)) { |
|
| 62 | + $data['sender'] = $this->getSenderData(); |
|
| 63 | + } |
|
| 62 | 64 | |
| 63 | 65 | $conn->send(json_encode($data)); |
| 64 | 66 | } |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * @throws \Illuminate\Validation\ValidationException |
| 48 | 48 | */ |
| 49 | 49 | public function validate($request, array $rules, |
| 50 | - array $messages = [], array $customAttributes = []) |
|
| 50 | + array $messages = [], array $customAttributes = []) |
|
| 51 | 51 | { |
| 52 | 52 | return $this->getValidationFactory()->make( |
| 53 | 53 | (array) $request, $rules, $messages, $customAttributes |