diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 6aa0b582c216a..733085c0f3a9d 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -95,7 +95,7 @@ public static function humanFileSize($bytes) { /** * Make a computer file size * @param string $str file size in human readable format - * @return float|bool a file size in bytes + * @return int|false a file size in bytes * * Makes 2kB to 2048. * @@ -104,7 +104,7 @@ public static function humanFileSize($bytes) { public static function computerFileSize($str) { $str = strtolower($str); if (is_numeric($str)) { - return (float)$str; + return (int)$str; } $bytes_array = [ @@ -131,7 +131,7 @@ public static function computerFileSize($str) { $bytes = round($bytes); - return $bytes; + return (int)$bytes; } /** diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index edee23995f1a3..959e8c0260964 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -158,7 +158,7 @@ public static function isDefaultExpireDateEnforced() { * Get the quota of a user * * @param IUser|null $user - * @return float Quota bytes + * @return int|\OCP\Files\FileInfo::SPACE_UNLIMITED|false Quota bytes */ public static function getUserQuota(?IUser $user) { if (is_null($user)) {