Remove superfluous parentheses

This commit is contained in:
2021-09-17 15:52:37 +02:00
parent 80ab3216d5
commit a6ebab3e03
3 changed files with 17 additions and 16 deletions

View File

@ -383,7 +383,7 @@ final class MD_STD {
];
if (isset($_GET['navlang']) and in_array($_GET['navlang'], $allowed_langs, true)) {
if (!(setcookie('__Host-lang', $_GET['navlang'], $cookie_options))) {
if (!setcookie('__Host-lang', $_GET['navlang'], $cookie_options)) {
throw new Exception("Failed to set language");
}
$lang = $_GET['navlang'];
@ -393,7 +393,7 @@ final class MD_STD {
}
else {
$lang = self::lang_getfrombrowser($allowed_langs, $default_lang, "", false);
if (!(setcookie('__Host-lang', $lang, $cookie_options))) {
if (!setcookie('__Host-lang', $lang, $cookie_options)) {
throw new Exception("Failed to set language");
}
}
@ -521,7 +521,7 @@ final class MD_STD {
*/
public static function human_filesize(int $bytes, int $decimals = 2):string {
$size = ['B','kB','MB','GB','TB','PB','EB','ZB','YB'];
$size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
$factor = \floor((\strlen((string)$bytes) - 1) / 3);
return \sprintf("%.{$decimals}f", $bytes / \pow(1024, $factor)) . $size[$factor];