<?php
class Kwf_View_Helper_FileSize
{
    public static function fileSize($filesize)
    {
        if (!is_int($filesize) && file_exists($filesize)) {
            $filesize = filesize($filesize);
        }
    
        $shortcuts = array("Bytes", "KB", "MB", "GB", "TB", "PB");
    
        $i = 0;
        while ($filesize > 1024 && isset($shortcuts[$i+1])) {
            $filesize = $filesize / 1024;
            $i++;
        }
    
        if ($filesize < 10) {
            $ret = number_format($filesize, 1, ",", ".");
        } else {
            $ret = number_format($filesize, 0, ",", ".");
        }
    
        $ret .= ' '.$shortcuts[$i];
        return $ret;
    }
}

<?php
class Kwf_View_Helper_FileSize
{
    public function fileSize($filesize)
    {
        if (!is_int($filesize) && file_exists($filesize)) {
            $filesize = filesize($filesize);
        }
    
        $shortcuts = array("Bytes", "KB", "MB", "GB", "TB", "PB");
    
        $i = 0;
        while ($filesize > 1024 && isset($shortcuts[$i+1])) {
            $filesize = $filesize / 1024;
            $i++;
        }
    
        if ($filesize < 10) {
            $ret = number_format($filesize, 1, ",", ".");
        } else {
            $ret = number_format($filesize, 0, ",", ".");
        }
    
        $ret .= ' '.$shortcuts[$i];
        return $ret;
    }
}

Revert "Function is used statically, changed function definition to fix error"
Revert "Function is used statically, changed function definition to fix error"

This reverts commit d4bfa121e6a028f0a8d239e8a4806e44b553e737.
