Apply fixes from StyleCI
This commit is contained in:
parent
908fb3854f
commit
1dc451d6bb
@ -322,9 +322,15 @@ class MTProto extends \Volatile
|
||||
unset($settings['authorization']['rsa_key']);
|
||||
}
|
||||
foreach ($settings['connection_settings'] as $key => &$connection) {
|
||||
if (!is_array($connection)) continue;
|
||||
if (!isset($connection['proxy'])) $connection['proxy'] = '\Socket';
|
||||
if (!isset($connection['proxy_extra'])) $connection['proxy_extra'] = [];
|
||||
if (!is_array($connection)) {
|
||||
continue;
|
||||
}
|
||||
if (!isset($connection['proxy'])) {
|
||||
$connection['proxy'] = '\Socket';
|
||||
}
|
||||
if (!isset($connection['proxy_extra'])) {
|
||||
$connection['proxy_extra'] = [];
|
||||
}
|
||||
}
|
||||
if (!isset($settings['authorization']['rsa_key'])) {
|
||||
unset($settings['authorization']['rsa_key']);
|
||||
|
@ -236,7 +236,9 @@ trait AuthKeyHandler
|
||||
if (!class_exists('\danog\MadelineProto\VoIP')) {
|
||||
throw new \danog\MadelineProto\Exception('The php-libtgvoip extension is required to accept and manage calls. See daniil.it/MadelineProto for more info.');
|
||||
}
|
||||
if (!isset($this->calls[$call['id']])) return;
|
||||
if (!isset($this->calls[$call['id']])) {
|
||||
return;
|
||||
}
|
||||
\danog\MadelineProto\Logger::log(['Discarding call '.$call['id'].'...'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
try {
|
||||
$res = $this->method_call('phone.discardCall', ['peer' => $call, 'duration' => time() - $this->calls[$call['id']]->whenCreated(), 'connection_id' => $this->calls[$call['id']]->getPreferredRelayID(), 'reason' => $reason], ['datacenter' => $this->datacenter->curdc]);
|
||||
|
Loading…
Reference in New Issue
Block a user