public static function humanFileSize($size, $unit = '')
    {
        if (self::isHumanFilesizeUnitGb($size, $unit)) {
            return number_format($size / (1 << 30), 2) . 'GB';
        }
        if (self::isHumanFilesizeUnitMb($size, $unit)) {
            return number_format($size / (1 << 20), 2) . 'MB';
        }
        if (self::isHumanFilesizeUnitKb($size, $unit)) {
            return number_format($size / (1 << 10), 2) . 'KB';
        }

        return number_format($size) . ' bytes';
    }