From d536ddb5fd07db480852dcd6af7f5f582576a546 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 8 Nov 2017 10:42:06 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/Exception.php | 2 +- src/danog/MadelineProto/MTProto.php | 1 - src/danog/MadelineProto/MTProtoTools/ResponseHandler.php | 1 + src/danog/MadelineProto/Wrappers/DialogHandler.php | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Exception.php b/src/danog/MadelineProto/Exception.php index 4b7f8f08..d259d56e 100644 --- a/src/danog/MadelineProto/Exception.php +++ b/src/danog/MadelineProto/Exception.php @@ -21,7 +21,7 @@ class Exception extends \Exception return $this->file === 'MadelineProto' ? $this->message : '\danog\MadelineProto\Exception'.($this->message !== '' ? ': ' : '').$this->message.' in '.$this->file.':'.$this->line.PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.$this->getTLTrace(); } - public function __construct($message = null, $code = 0, Exception $previous = null, $file = null, $line = null) + public function __construct($message = null, $code = 0, self $previous = null, $file = null, $line = null) { $this->prettify_tl(); if ($file !== null) { diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 16fc4ba1..72700bc0 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -192,7 +192,6 @@ class MTProto private $emojis; private $postpone_updates = false; - public function ___construct($settings = []) { // Parse settings diff --git a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php index 199e4832..0f121ddf 100644 --- a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php @@ -374,6 +374,7 @@ trait ResponseHandler if ($this->postpone_updates) { \danog\MadelineProto\Logger::log(['Postpone update handling'], \danog\MadelineProto\Logger::VERBOSE); $this->pending_updates[] = $updates; + return false; } $this->handle_pending_updates(); diff --git a/src/danog/MadelineProto/Wrappers/DialogHandler.php b/src/danog/MadelineProto/Wrappers/DialogHandler.php index eca0de57..765c8501 100644 --- a/src/danog/MadelineProto/Wrappers/DialogHandler.php +++ b/src/danog/MadelineProto/Wrappers/DialogHandler.php @@ -30,6 +30,7 @@ trait DialogHandler $peers = []; $this->postpone_updates = true; + try { while ($this->dialog_params['count'] < $res['count']) { \danog\MadelineProto\Logger::log([\danog\MadelineProto\Lang::$current_lang['getting_dialogs']]);