Util
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
cd2701f83d
commit
b7551996ef
@ -14184,12 +14184,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Util.php
|
||||
|
||||
-
|
||||
message: '#^Offset int\<1, 6\> on array\{string, string, string, string, string, string, string\} in isset\(\) always exists and is not nullable\.$#'
|
||||
identifier: isset.offset
|
||||
count: 1
|
||||
path: src/Util.php
|
||||
|
||||
-
|
||||
message: '#^Only booleans are allowed in a negated boolean, int\<0, 2\> given\.$#'
|
||||
identifier: booleanNot.exprNotBoolean
|
||||
|
||||
@ -330,7 +330,7 @@ class Util
|
||||
/** @infection-ignore-all */
|
||||
for ($d = 6, $ex = 15; $d >= 1; $d--, $ex -= 3) {
|
||||
$unitSize = $li * 10 ** $ex;
|
||||
if (isset($byteUnits[$d]) && $value >= $unitSize) {
|
||||
if ($value >= $unitSize) {
|
||||
// use 1024.0 to avoid integer overflow on 64-bit machines
|
||||
$value = round($value / (1024 ** $d / $dh)) / $dh;
|
||||
$unit = $byteUnits[$d];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user