mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 09:58:59 +01:00
Apply fixes from StyleCI
This commit is contained in:
parent
88c9e18517
commit
6604623188
@ -18,16 +18,18 @@ namespace danog\MadelineProto\MTProtoTools;
|
||||
*/
|
||||
trait PeerHandler
|
||||
{
|
||||
|
||||
public function to_supergroup($id)
|
||||
{
|
||||
return -($id + pow(10, (int) floor(log($id, 10) + 3)));
|
||||
}
|
||||
|
||||
public function is_supergroup($id)
|
||||
{
|
||||
$log = log(-$id, 10);
|
||||
return ($log-intval($log))*1000<10;
|
||||
|
||||
return ($log - intval($log)) * 1000 < 10;
|
||||
}
|
||||
|
||||
public function add_users($users)
|
||||
{
|
||||
foreach ($users as $key => $user) {
|
||||
@ -581,5 +583,4 @@ trait PeerHandler
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ trait TLParams
|
||||
$param['type'] = $matches[2];
|
||||
}
|
||||
if (preg_match('/^(v|V)ector\<(.*)\>$/', $param['type'], $matches)) {
|
||||
$param['type'] = $matches[1] === 'v' ? 'vector': 'Vector t';
|
||||
$param['type'] = $matches[1] === 'v' ? 'vector' : 'Vector t';
|
||||
$param['subtype'] = $matches[2];
|
||||
$param['subtype'] = ($mtproto && $param['subtype'] === 'Message' ? 'MT' : '').$param['subtype'];
|
||||
$param['subtype'] = $mtproto && $param['subtype'] === '%Message' ? '%MTMessage' : $param['subtype'];
|
||||
|
Loading…
Reference in New Issue
Block a user