Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-04-05 00:10:13 +00:00 committed by StyleCI Bot
parent c90e353345
commit d787cef5de
3 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,6 @@ trait SeqNoHandler
public function content_related($method)
{
return isset($method['_']) ? !in_array(
$method['_'],
[

View File

@ -534,14 +534,17 @@ trait TL
}
}
if ($constructorData['predicate'] === 'gzip_packed') {
if (!isset($type['subtype'])) $type['subtype'] = '';
if (!isset($type['subtype'])) {
$type['subtype'] = '';
}
return $this->deserialize(gzdecode($this->deserialize($bytes_io, ['type' => 'bytes'])), ['type' => '', 'datacenter' => $type['datacenter'], 'subtype' => $type['subtype']]);
}
if ($constructorData['type'] === 'Vector t') {
$constructorData['datacenter'] = $type['datacenter'];
$constructorData['subtype'] = $type['subtype'];
$constructorData['type'] = 'vector';
return $this->deserialize($bytes_io, $constructorData);
}
$x = ['_' => $constructorData['predicate']];
@ -569,9 +572,8 @@ trait TL
if (in_array($arg['name'], ['msg_ids', 'msg_id', 'bad_msg_id', 'req_msg_id', 'answer_msg_id', 'first_msg_id', 'key_fingerprint', 'server_salt', 'new_server_salt', 'server_public_key_fingerprints', 'ping_id', 'exchange_id'])) {
$arg['strlong'] = true;
}
if ($x['_'] === 'rpc_result' && $arg['name'] === 'result' && isset($this->datacenter->sockets[$type['datacenter']]->new_outgoing[$x['req_msg_id']]['type']) && stripos($this->datacenter->sockets[$type['datacenter']]->new_outgoing[$x['req_msg_id']]['type'], '<') !== false) {
$arg['subtype'] = preg_replace(['|Vector[<]|', '|[>]|'], '', $this->datacenter->sockets[$type['datacenter']]->new_outgoing[$x['req_msg_id']]['type']);
}
$arg['datacenter'] = $type['datacenter'];

View File

@ -70,7 +70,6 @@ echo 'Serializing MadelineProto to session.madeline...'.PHP_EOL;
echo 'Wrote '.\danog\MadelineProto\Serialization::serialize('session.madeline', $MadelineProto).' bytes'.PHP_EOL;
echo 'Size of MadelineProto instance is '.strlen(serialize($MadelineProto)).' bytes'.PHP_EOL;
$call = $MadelineProto->API->request_call(getenv('TEST_SECRET_CHAT'));
echo 'Waiting for '.getenv('TEST_SECRET_CHAT').' to accept the call...'.PHP_EOL;