Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-04-22 15:50:31 +00:00 committed by StyleCI Bot
parent a1f4b5ed81
commit 31e5a3968a
2 changed files with 30 additions and 26 deletions

View File

@ -456,7 +456,9 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
if ($int_dc != $new_dc) { if ($int_dc != $new_dc) {
continue; continue;
} }
if (preg_match('|media|', $new_dc)) continue; if (preg_match('|media|', $new_dc)) {
continue;
}
\danog\MadelineProto\Logger::log(['Copying authorization from dc '.$authorized_dc.' to dc '.$new_dc.'...'], Logger::VERBOSE); \danog\MadelineProto\Logger::log(['Copying authorization from dc '.$authorized_dc.' to dc '.$new_dc.'...'], Logger::VERBOSE);
$this->should_serialize = true; $this->should_serialize = true;
$exported_authorization = $this->method_call('auth.exportAuthorization', ['dc_id' => $new_dc], ['datacenter' => $authorized_dc]); $exported_authorization = $this->method_call('auth.exportAuthorization', ['dc_id' => $new_dc], ['datacenter' => $authorized_dc]);

View File

@ -51,7 +51,9 @@ class RPCErrorException extends \Exception
} }
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);
if (in_array($message, ['The provided username is not valid', 'The provided token is not valid'])) return; if (in_array($message, ['The provided username is not valid', 'The provided token is not valid'])) {
return;
}
\Rollbar\Rollbar::log($this); \Rollbar\Rollbar::log($this);
} }
} }