From 9de3f24215a4d8d4b14a4253c2c351fbac8fa699 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 8 Mar 2018 21:20:33 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/MTProtoTools/PeerHandler.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index 592572e4..9af379fa 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -479,7 +479,6 @@ trait PeerHandler } } - $count = $gres['count']; while ($offset <= $count) { @@ -541,14 +540,20 @@ trait PeerHandler return $res; } - public function gen_participants_hash($ids) { + + public function gen_participants_hash($ids) + { $hash = 0; - if (\danog\MadelineProto\Logger::$bigint) return $hash; + if (\danog\MadelineProto\Logger::$bigint) { + return $hash; + } foreach ($ids as $userID) { $hash = (($hash * 20261) + 0x80000000 + $userID) % 0x80000000; } + return $hash; } + public function store_db($res, $force = false) { $settings = isset($this->settings['connection_settings'][$this->datacenter->curdc]) ? $this->settings['connection_settings'][$this->datacenter->curdc] : $this->settings['connection_settings']['all'];