Apply fixes from StyleCI
This commit is contained in:
parent
801934775c
commit
6e368f42be
@ -77,7 +77,7 @@ trait CallHandler
|
|||||||
$l = strlen($serialized);
|
$l = strlen($serialized);
|
||||||
$g = strlen($gzipped = gzencode($serialized));
|
$g = strlen($gzipped = gzencode($serialized));
|
||||||
if ($l > 500 && $g < $l) {
|
if ($l > 500 && $g < $l) {
|
||||||
\danog\MadelineProto\Logger::log(['Using GZIP compression for '.$method.', saved '.($l-$g).' bytes of data, reduced call size by '.($g*100/$l).'%'], \danog\MadelineProto\Logger::VERBOSE);
|
\danog\MadelineProto\Logger::log(['Using GZIP compression for '.$method.', saved '.($l - $g).' bytes of data, reduced call size by '.($g * 100 / $l).'%'], \danog\MadelineProto\Logger::VERBOSE);
|
||||||
$serialized = $this->serialize_object(['type' => 'gzip_packed'], ['packed_data' => $gzipped], 'gzipped data');
|
$serialized = $this->serialize_object(['type' => 'gzip_packed'], ['packed_data' => $gzipped], 'gzipped data');
|
||||||
}
|
}
|
||||||
$last_recv = $this->last_recv;
|
$last_recv = $this->last_recv;
|
||||||
|
@ -76,7 +76,9 @@ class Serialization
|
|||||||
} catch (\danog\MadelineProto\Bug74586Exception $e) {
|
} catch (\danog\MadelineProto\Bug74586Exception $e) {
|
||||||
$unserialized = \danog\Serialization::unserialize($tounserialize);
|
$unserialized = \danog\Serialization::unserialize($tounserialize);
|
||||||
} catch (\danog\MadelineProto\Exception $e) {
|
} catch (\danog\MadelineProto\Exception $e) {
|
||||||
if (Logger::$constructed) Logger::log([(string) $e], Logger::ERROR);
|
if (Logger::$constructed) {
|
||||||
|
Logger::log([(string) $e], Logger::ERROR);
|
||||||
|
}
|
||||||
$unserialized = \danog\Serialization::unserialize($tounserialize);
|
$unserialized = \danog\Serialization::unserialize($tounserialize);
|
||||||
}
|
}
|
||||||
if ($unserialized instanceof \danog\PlaceHolder) {
|
if ($unserialized instanceof \danog\PlaceHolder) {
|
||||||
|
Loading…
Reference in New Issue
Block a user