Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-07-22 12:11:48 +00:00 committed by StyleCI Bot
parent 8535df5908
commit cd87ed8c25
2 changed files with 4 additions and 0 deletions

View File

@ -682,6 +682,7 @@ class MTProto extends \Volatile
$authorization = $this->method_call('auth.importAuthorization', $exported_authorization, ['datacenter' => $new_dc]); $authorization = $this->method_call('auth.importAuthorization', $exported_authorization, ['datacenter' => $new_dc]);
} }
$this->updates_state['sync_loading'] = false; $this->updates_state['sync_loading'] = false;
return $authorization; return $authorization;
} }

View File

@ -132,6 +132,7 @@ trait Login
return $this->authorization; return $this->authorization;
} }
public function import_authorization($authorization) public function import_authorization($authorization)
{ {
if ($this->authorized === self::LOGGED_IN) { if ($this->authorized === self::LOGGED_IN) {
@ -152,6 +153,7 @@ trait Login
$this->authorized = self::LOGGED_IN; $this->authorized = self::LOGGED_IN;
$this->init_authorization(); $this->init_authorization();
return $this->authorization = $this->sync_authorization($dc_id); return $this->authorization = $this->sync_authorization($dc_id);
} }
@ -160,6 +162,7 @@ trait Login
if ($this->authorized !== self::LOGGED_IN) { if ($this->authorized !== self::LOGGED_IN) {
throw new \danog\MadelineProto\Exception("I'm not logged in!"); throw new \danog\MadelineProto\Exception("I'm not logged in!");
} }
return [$this->datacenter->curdc, $this->datacenter->sockets[$this->datacenter->curdc]->auth_key]; return [$this->datacenter->curdc, $this->datacenter->sockets[$this->datacenter->curdc]->auth_key];
} }