Skip to content

Commit 45da255

Browse files
committed
Use an integer as offset
1 parent 1db4828 commit 45da255

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Doctrine/ODM/MongoDB/Tests/Functional/MemoryUsageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ private function formatMemory($size)
6161
{
6262
$unit = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];
6363

64-
return round($size / pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $unit[$i];
64+
return round($size / pow(1024, ($i = (int) floor(log($size, 1024)))), 2) . ' ' . $unit[$i];
6565
}
6666
}

tests/Doctrine/ODM/MongoDB/Tests/Performance/MemoryUsageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ private function formatMemory($size)
6363
{
6464
$unit = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];
6565

66-
return round($size / pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $unit[$i];
66+
return round($size / pow(1024, ($i = (int) floor(log($size, 1024)))), 2) . ' ' . $unit[$i];
6767
}
6868
}

0 commit comments

Comments
 (0)