diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-16 10:58:26 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-16 10:58:26 +0200 |
commit | 53169890d6dccfcc48d80930e33824084d68aa1c (patch) | |
tree | 7069b6671b919e5a1200ac2c106224181e03343b /lib/private/legacy/OC_Util.php | |
parent | ad405e93767cfaf0ba34011010bb26dc4c05f60a (diff) | |
download | nextcloud-server-53169890d6dccfcc48d80930e33824084d68aa1c.tar.gz nextcloud-server-53169890d6dccfcc48d80930e33824084d68aa1c.zip |
Fix psalm errors fron the end of the baseline file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/legacy/OC_Util.php')
-rw-r--r-- | lib/private/legacy/OC_Util.php | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index ee7fb517d98..516ccc8283c 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -158,7 +158,7 @@ class OC_Util { * Get the quota of a user * * @param IUser|null $user - * @return float Quota bytes + * @return float|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes */ public static function getUserQuota(?IUser $user) { if (is_null($user)) { @@ -657,20 +657,8 @@ class OC_Util { } } foreach ($dependencies['ini'] as $setting => $expected) { - if (is_bool($expected)) { - if ($iniWrapper->getBool($setting) !== $expected) { - $invalidIniSettings[] = [$setting, $expected]; - } - } - if (is_int($expected)) { - if ($iniWrapper->getNumeric($setting) !== $expected) { - $invalidIniSettings[] = [$setting, $expected]; - } - } - if (is_string($expected)) { - if (strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) { - $invalidIniSettings[] = [$setting, $expected]; - } + if (strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) { + $invalidIniSettings[] = [$setting, $expected]; } } @@ -682,9 +670,6 @@ class OC_Util { $webServerRestart = true; } foreach ($invalidIniSettings as $setting) { - if (is_bool($setting[1])) { - $setting[1] = $setting[1] ? 'on' : 'off'; - } $errors[] = [ 'error' => $l->t('PHP setting "%s" is not set to "%s".', [$setting[0], var_export($setting[1], true)]), 'hint' => $l->t('Adjusting this setting in php.ini will make Nextcloud run again') |