Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-03-08 21:20:33 +00:00 committed by StyleCI Bot
parent aa04b5e8af
commit 9de3f24215

View File

@ -479,7 +479,6 @@ trait PeerHandler
} }
} }
$count = $gres['count']; $count = $gres['count'];
while ($offset <= $count) { while ($offset <= $count) {
@ -541,14 +540,20 @@ trait PeerHandler
return $res; return $res;
} }
public function gen_participants_hash($ids) {
public function gen_participants_hash($ids)
{
$hash = 0; $hash = 0;
if (\danog\MadelineProto\Logger::$bigint) return $hash; if (\danog\MadelineProto\Logger::$bigint) {
return $hash;
}
foreach ($ids as $userID) { foreach ($ids as $userID) {
$hash = (($hash * 20261) + 0x80000000 + $userID) % 0x80000000; $hash = (($hash * 20261) + 0x80000000 + $userID) % 0x80000000;
} }
return $hash; return $hash;
} }
public function store_db($res, $force = false) 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']; $settings = isset($this->settings['connection_settings'][$this->datacenter->curdc]) ? $this->settings['connection_settings'][$this->datacenter->curdc] : $this->settings['connection_settings']['all'];