Applied fixes from StyleCI
This commit is contained in:
parent
9d4c53795b
commit
7794a5ab2d
@ -88,6 +88,7 @@ class Connection
|
|||||||
if (!(get_resource_type($this->sock) == 'file' || get_resource_type($this->sock) == 'stream')) {
|
if (!(get_resource_type($this->sock) == 'file' || get_resource_type($this->sock) == 'stream')) {
|
||||||
throw new Exception("Connection: couldn't connect to socket.");
|
throw new Exception("Connection: couldn't connect to socket.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return fwrite($this->sock, $what);
|
return fwrite($this->sock, $what);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -105,7 +105,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
|||||||
*/
|
*/
|
||||||
public function send_message($message_data)
|
public function send_message($message_data)
|
||||||
{
|
{
|
||||||
switch ($this->settings["protocol"]) {
|
switch ($this->settings['protocol']) {
|
||||||
case 'tcp_full':
|
case 'tcp_full':
|
||||||
$message_id = $this->struct->pack('<Q', (int) ((time() + $this->timedelta) * pow(2, 30)) * 4);
|
$message_id = $this->struct->pack('<Q', (int) ((time() + $this->timedelta) * pow(2, 30)) * 4);
|
||||||
if (($this->auth_key == null) || ($this->server_salt == null)) {
|
if (($this->auth_key == null) || ($this->server_salt == null)) {
|
||||||
@ -134,7 +134,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
|||||||
*/
|
*/
|
||||||
public function recv_message()
|
public function recv_message()
|
||||||
{
|
{
|
||||||
switch ($this->settings["protocol"]) {
|
switch ($this->settings['protocol']) {
|
||||||
case 'tcp_full':
|
case 'tcp_full':
|
||||||
$packet_length_data = $this->sock->read(4);
|
$packet_length_data = $this->sock->read(4);
|
||||||
if (strlen($packet_length_data) < 4) {
|
if (strlen($packet_length_data) < 4) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user