From 7a66cb84dc7b632b7f81e9cfc85ee2991d2b1d4f Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 22 Nov 2022 15:39:00 +0100 Subject: [PATCH] Revert "[stable24] Fix quota type to int" Signed-off-by: Vincent Petry --- lib/private/legacy/OC_Helper.php | 6 +++--- lib/private/legacy/OC_Util.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index ba9ac13b216..269922f21dd 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 int|false a file size in bytes + * @return float|bool a file size in bytes * * Makes 2kB to 2048. * @@ -104,7 +104,7 @@ class OC_Helper { public static function computerFileSize($str) { $str = strtolower($str); if (is_numeric($str)) { - return (int)$str; + return (float)$str; } $bytes_array = [ @@ -131,7 +131,7 @@ class OC_Helper { $bytes = round($bytes); - return (int)$bytes; + return $bytes; } /** diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 3a3b634e522..84416c21337 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 int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes + * @return float Quota bytes */ public static function getUserQuota(?IUser $user) { if (is_null($user)) { -- 2.39.5