Bug fix in Basic class string to bytes convert
This commit is contained in:
@@ -42,3 +42,12 @@ parameters:
|
|||||||
- www/lib/smarty-3.1.30/
|
- www/lib/smarty-3.1.30/
|
||||||
# ignore composer
|
# ignore composer
|
||||||
- www/vendor
|
- www/vendor
|
||||||
|
# ignore errores with
|
||||||
|
# ignoreErrors:
|
||||||
|
#- 'error regex'
|
||||||
|
#-
|
||||||
|
# message: 'error regex'
|
||||||
|
# path: %currentWorkingDirectory%/www/some/*
|
||||||
|
# paths:
|
||||||
|
# - ...
|
||||||
|
# - ...
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
phan --progress-bar -C -o analysis.txt
|
# main static checker
|
||||||
|
phan --progress-bar -C -o 4dev/tmp/analysis.txt
|
||||||
|
# sub static checker
|
||||||
phpstan analyse -c phpstan.neon --memory-limit=4G -l 0 www
|
phpstan analyse -c phpstan.neon --memory-limit=4G -l 0 www
|
||||||
|
# only if we work with composer only
|
||||||
www/: psalm (this needs the composer autoloader defined)
|
www/: psalm (this needs the composer autoloader defined)
|
||||||
|
|
||||||
|
# for linting
|
||||||
|
parallel-lint www/
|
||||||
|
|||||||
@@ -1512,7 +1512,7 @@ class Basic
|
|||||||
// labels in order of size
|
// labels in order of size
|
||||||
$labels = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');
|
$labels = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');
|
||||||
// calc file size, round down too two digits, add label based max change
|
// calc file size, round down too two digits, add label based max change
|
||||||
return round($number / pow(1024, ($i = floor(log($number, 1024)))), 2).($space ? ' ' : '').(isset($labels[(int)$i]) ? $labels[(int)$i] : '>EB');
|
return round($number / pow(1024, ($i = floor(log((float)$number, 1024)))), 2).($space ? ' ' : '').(isset($labels[(int)$i]) ? $labels[(int)$i] : '>EB');
|
||||||
}
|
}
|
||||||
return (string)$number;
|
return (string)$number;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user