Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-07-21 10:24:07 +00:00 committed by StyleCI Bot
parent 432b723678
commit fe3fa04361
2 changed files with 2 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class MTProto extends \Volatile
foreach ($this->calls as $id => $controller) {
if (is_array($controller)) {
unset($this->calls[$id]);
} else if ($controller->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
} elseif ($controller->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) {
$controller->discard();
}
}

View File

@ -494,6 +494,7 @@ trait UpdateHandler
if (!isset($this->calls[$update['phone_call']['id']])) {
return;
}
return $this->calls[$update['phone_call']['id']]->discard(['_' => 'phoneCallDiscardReasonHangup'], [], $update['phone_call']['need_debug']);
}
}