src/Controller/PlatformSchemeController.php
private function convertWithBytes($size)
    {
        $precision = 2;
        $base      = log($size, 1024);
        $suffixes  = array('B', 'KB', 'MB', 'GB', 'TB');
        $bytes     = round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];

        return $bytes;
    }
private function convertWithBytes($size)
    {
        $precision = 2;
        $base      = log($size, 1024);
        $suffixes  = array('B', 'KB', 'MB', 'GB', 'TB');
        $bytes     = round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];

        return $bytes;
    }
private function convertWithBytes ( $ size ) { $ precision = 2 ; $ base = log ( $ size , 1024 ) ; $ suffixes = array ( 'B' , 'KB' , 'MB' , 'GB' , 'TB' ) ; $ bytes = round ( pow ( 1024 , $ base - floor ( $ base ) ) , $ precision ) . $ suffixes [ floor ( $ base ) ] ; return $ bytes ; }
Returns the formatted byte size
@param $size
@return string
Returns the formatted byte size