diff --git a/src/danog/MadelineProto/DataCenter.php b/src/danog/MadelineProto/DataCenter.php index 8b895988..43e5d08f 100644 --- a/src/danog/MadelineProto/DataCenter.php +++ b/src/danog/MadelineProto/DataCenter.php @@ -35,7 +35,11 @@ class DataCenter extends \Volatile $this->dclist = $dclist; $this->settings = $settings; foreach ($this->sockets as $key => $socket) { - if ($socket instanceof Connection) $socket->close_and_reopen(); else unset($this->sockets[$key]); + if ($socket instanceof Connection) { + $socket->close_and_reopen(); + } else { + unset($this->sockets[$key]); + } } } diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index d19cd371..b588d972 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -247,7 +247,9 @@ class MTProto extends \Volatile $this->should_serialize = true; } } catch (RPCErrorException $e) { - if ($e->rpc !== "BOT_METHOD_INVALID") throw $e; + if ($e->rpc !== 'BOT_METHOD_INVALID') { + throw $e; + } } } $this->get_config([], ['datacenter' => $this->datacenter->curdc]);