Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-03-26 03:16:03 +00:00 committed by StyleCI Bot
parent 432fc32d05
commit 44756267ad
2 changed files with 2 additions and 3 deletions

View File

@ -29,7 +29,7 @@ trait CallHandler
throw new \danog\MadelineProto\Exception('No datacenter provided');
}
$args = $this->botAPI_to_MTProto($args);
if (isset($args['ping_id']) && is_integer($args['ping_id'])) {
if (isset($args['ping_id']) && is_int($args['ping_id'])) {
$args['ping_id'] = \danog\PHP\Struct::pack('<q', $args['ping_id']);
}
$serialized = $this->serialize_method($method, $args);

View File

@ -28,7 +28,6 @@ trait SeqNoHandler
public function check_in_seq_no($datacenter, $current_msg_id)
{
if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']) && ($seq_no = $this->generate_in_seq_no($datacenter, $this->content_related($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_']))) !== $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']) {
\danog\MadelineProto\Logger::log(['SECURITY WARNING: Seqno mismatch (should be '.$seq_no.', is '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no'].', '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_'].')'], \danog\MadelineProto\Logger::ERROR);
}
@ -45,7 +44,7 @@ trait SeqNoHandler
public function content_related($method)
{
//var_dump($method);
//var_dump($method);
return !in_array(
$method,
[