mirror of
https://github.com/danog/laravel-madeline-proto.git
synced 2024-11-29 20:18:59 +01:00
Code cleaning
This commit is contained in:
parent
3f8940760b
commit
2a303fe21d
@ -46,11 +46,12 @@ class MadelineProto
|
|||||||
{
|
{
|
||||||
$response = new TelegramObject($this->client->completePhoneLogin($code));
|
$response = new TelegramObject($this->client->completePhoneLogin($code));
|
||||||
|
|
||||||
switch ($response->return_type) {
|
if ($response->return_type == Account::PASSWORD) {
|
||||||
case Account::PASSWORD:
|
throw new NeedTwoFactorAuthException($response);
|
||||||
throw new NeedTwoFactorAuthException($response);
|
}
|
||||||
case Account::NEED_SIGN_UP:
|
|
||||||
throw new SignUpNeededException();
|
if ($response->return_type == Account::NEED_SIGN_UP) {
|
||||||
|
throw new SignUpNeededException();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
@ -145,7 +146,7 @@ class MadelineProto
|
|||||||
*
|
*
|
||||||
* @return ClientMessages
|
* @return ClientMessages
|
||||||
*/
|
*/
|
||||||
public function messages()
|
public function messages(): ClientMessages
|
||||||
{
|
{
|
||||||
return new ClientMessages($this->client->messages);
|
return new ClientMessages($this->client->messages);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user