From 13c65940c1edc0b7d0f59a7fe4e8f290488bd15e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 31 May 2017 09:23:36 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/DataCenter.php | 6 +++++- src/danog/MadelineProto/MTProto.php | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) 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 f2300cfa..ed0712da 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]);