@@ -234,7 +234,7 @@ |
||
| 234 | 234 | */ |
| 235 | 235 | public function send_command($command) |
| 236 | 236 | { |
| 237 | - return $this->sendCommand($command) ; |
|
| 237 | + return $this->sendCommand($command); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | /** |
@@ -73,8 +73,9 @@ discard block |
||
| 73 | 73 | stream_set_timeout($this->socket, 3, 0); |
| 74 | 74 | |
| 75 | 75 | // check authorization |
| 76 | - if ($this->authorize()) |
|
| 77 | - return true; |
|
| 76 | + if ($this->authorize()) { |
|
| 77 | + return true; |
|
| 78 | + } |
|
| 78 | 79 | |
| 79 | 80 | return false; |
| 80 | 81 | } |
@@ -86,8 +87,9 @@ discard block |
||
| 86 | 87 | */ |
| 87 | 88 | public function disconnect() |
| 88 | 89 | { |
| 89 | - if ($this->socket) |
|
| 90 | - fclose($this->socket); |
|
| 90 | + if ($this->socket) { |
|
| 91 | + fclose($this->socket); |
|
| 92 | + } |
|
| 91 | 93 | } |
| 92 | 94 | |
| 93 | 95 | /** |
@@ -109,8 +111,9 @@ discard block |
||
| 109 | 111 | */ |
| 110 | 112 | public function sendCommand($command) |
| 111 | 113 | { |
| 112 | - if (!$this->isConnected()) |
|
| 113 | - return false; |
|
| 114 | + if (!$this->isConnected()) { |
|
| 115 | + return false; |
|
| 116 | + } |
|
| 114 | 117 | |
| 115 | 118 | // send command packet |
| 116 | 119 | $this->writePacket(Rcon::PACKET_COMMAND, Rcon::SERVERDATA_EXECCOMMAND, $command); |