Applied fixes from StyleCI

This commit is contained in:
Daniil Gentili 2016-09-10 17:53:28 +00:00 committed by StyleCI Bot
parent c51e4cb9d8
commit 5fe5673fb7
2 changed files with 7 additions and 4 deletions

View File

@ -15,6 +15,6 @@ namespace danog\MadelineProto;
/**
* Manages encryption and message frames.
*/
class MTProto extends Tools {
}
class MTProto extends Tools
{
}

View File

@ -176,6 +176,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
$in = $content_related ? 1 : 0;
$value = $this->seq_no;
$this->seq_no += $in;
return ($value * 2) + $in;
}
@ -276,7 +277,9 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
foreach (range(1, $this->settings['max_tries']['query']) as $i) {
try {
$this->send_message($this->tl->serialize_method($method, $args), $this->tl->content_related($method));
if ($opts["requires_answer"]) $server_answer = $this->recv_message();
if ($opts['requires_answer']) {
$server_answer = $this->recv_message();
}
} catch (Exception $e) {
$this->log->log('An error occurred while calling method '.$method.': '.$e->getMessage().' in '.$e->getFile().':'.$e->getLine().'. Recreating connection and retrying to call method...');
unset($this->sock);