mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 11:34:41 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
35c0a6bd67
commit
4b3c010c4c
@ -296,7 +296,9 @@ trait PeerHandler
|
||||
switch ($partial['type']) {
|
||||
case 'user':
|
||||
case 'bot':
|
||||
if (!isset($partial['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
if (!isset($partial['InputUser'])) {
|
||||
throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
}
|
||||
$full = $this->method_call('users.getFullUser', ['id' => $partial['InputUser']], ['datacenter' => $this->datacenter->curdc]);
|
||||
break;
|
||||
|
||||
|
@ -138,7 +138,9 @@ trait UpdateHandler
|
||||
}
|
||||
try {
|
||||
$input = $this->get_info('channel#'.$channel);
|
||||
if (!isset($input['InputChannel'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
if (!isset($input['InputChannel'])) {
|
||||
throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
}
|
||||
$input = $input['InputChannel'];
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
return false;
|
||||
|
@ -45,7 +45,9 @@ trait AuthKeyHandler
|
||||
{
|
||||
$this->should_serialize = true;
|
||||
$user = $this->get_info($user);
|
||||
if (!isset($user['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
if (!isset($user['InputUser'])) {
|
||||
throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
}
|
||||
$user = $user['InputUser'];
|
||||
\danog\MadelineProto\Logger::log(['Creating secret chat with '.$user['user_id'].'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
$dh_config = $this->get_dh_config();
|
||||
|
@ -30,7 +30,9 @@ trait AuthKeyHandler
|
||||
public function request_call($user)
|
||||
{
|
||||
$user = $this->get_info($user);
|
||||
if (!isset($user['InputUser'])) throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
if (!isset($user['InputUser'])) {
|
||||
throw new \danog\MadelineProto\Exception('This peer is not present in the internal peer database');
|
||||
}
|
||||
$user = $user['InputUser'];
|
||||
\danog\MadelineProto\Logger::log(['Calling '.$user['user_id'].'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
$dh_config = $this->get_dh_config();
|
||||
|
Loading…
Reference in New Issue
Block a user