Convert to PSR-2 coding style (using phpcs-fixer)

This commit is contained in:
Sobak
2016-07-26 08:19:35 +02:00
parent 884310add6
commit 5d7003ecc1
37 changed files with 636 additions and 665 deletions

View File

@@ -78,9 +78,9 @@ class filter
{
$iec = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB');
$i = 0;
while ( ( $size / 1024 ) >= 1 ) {
$size = $size / 1024;
$i++;
while (($size / 1024) >= 1) {
$size = $size / 1024;
$i++;
}
return number_format($size, ($i ? 2 : 0), '.', ' ') . ' ' . i18n::_($iec[$i]);
}
@@ -98,10 +98,9 @@ class filter
public static function slow_equals($a, $b)
{
$diff = strlen($a) ^ strlen($b);
for($i = 0; $i < strlen($a) && $i < strlen($b); $i++)
{
for ($i = 0; $i < strlen($a) && $i < strlen($b); $i++) {
$diff |= ord($a[$i]) ^ ord($b[$i]);
}
return $diff === 0;
}
}
}