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_Helper.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_Helper.php')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 6aa0b582c21..226f73a0711 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -95,7 +95,7 @@ class OC_Helper { /** * Make a computer file size * @param string $str file size in human readable format - * @return float|bool a file size in bytes + * @return float|false a file size in bytes * * Makes 2kB to 2048. * @@ -420,11 +420,11 @@ class OC_Helper { */ public static function uploadLimit() { $ini = \OC::$server->get(IniGetWrapper::class); - $upload_max_filesize = OCP\Util::computerFileSize($ini->get('upload_max_filesize')); - $post_max_size = OCP\Util::computerFileSize($ini->get('post_max_size')); - if ((int)$upload_max_filesize === 0 and (int)$post_max_size === 0) { + $upload_max_filesize = (int)OCP\Util::computerFileSize($ini->get('upload_max_filesize')); + $post_max_size = (int)OCP\Util::computerFileSize($ini->get('post_max_size')); + if ($upload_max_filesize === 0 && $post_max_size === 0) { return INF; - } elseif ((int)$upload_max_filesize === 0 or (int)$post_max_size === 0) { + } elseif ($upload_max_filesize === 0 || $post_max_size === 0) { return max($upload_max_filesize, $post_max_size); //only the non 0 value counts } else { return min($upload_max_filesize, $post_max_size); |