From f254284630bbd36340722a5007ca982512c5db3c Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 20 Jul 2017 17:32:07 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/MTProtoTools/UpdateHandler.php | 4 +++- src/danog/MadelineProto/VoIP/AuthKeyHandler.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index c7b3e18b..c16b3f26 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -490,7 +490,9 @@ trait UpdateHandler break; case 'phoneCallDiscarded': - if (!isset($this->calls[$update['phone_call']['id']])) return; + if (!isset($this->calls[$update['phone_call']['id']])) { + return; + } ($update['phone_call'] = $this->calls[$update['phone_call']['id']])->discard(['_' => 'phoneCallDiscardReasonHangup'], [], $update['phone_call']['need_debug']); break; } diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index 7624fa72..9f2a3bc3 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -70,7 +70,6 @@ trait AuthKeyHandler }); if ($this->call_status($params['id']) !== \danog\MadelineProto\VoIP::CALL_STATE_INCOMING) { throw new \danog\MadelineProto\Exception('I cannot accept call '.$params['id']); - return false; } \danog\MadelineProto\Logger::log(['Accepting call from '.$this->calls[$params['id']]->getOtherID().'...'], \danog\MadelineProto\Logger::VERBOSE); @@ -101,6 +100,7 @@ trait AuthKeyHandler }); if ($this->call_status($params['id']) !== \danog\MadelineProto\VoIP::CALL_STATE_REQUESTED) { \danog\MadelineProto\Logger::log(['Could not find and confirm call '.$params['id']]); + return false; } \danog\MadelineProto\Logger::log(['Confirming call from '.$this->calls[$params['id']]->getOtherID().'...'], \danog\MadelineProto\Logger::VERBOSE);