Code cleaning

This commit is contained in:
Setiawan Hu 2021-05-20 21:34:00 +07:00
parent 3f8940760b
commit 2a303fe21d

View File

@ -46,10 +46,11 @@ class MadelineProto
{
$response = new TelegramObject($this->client->completePhoneLogin($code));
switch ($response->return_type) {
case Account::PASSWORD:
if ($response->return_type == Account::PASSWORD) {
throw new NeedTwoFactorAuthException($response);
case Account::NEED_SIGN_UP:
}
if ($response->return_type == Account::NEED_SIGN_UP) {
throw new SignUpNeededException();
}
@ -145,7 +146,7 @@ class MadelineProto
*
* @return ClientMessages
*/
public function messages()
public function messages(): ClientMessages
{
return new ClientMessages($this->client->messages);
}