Skip to content

Commit df058ab

Browse files
Merge pull request #75
[4.x] Simplify memory unit calculation in `MemoryService` by removing unnecessary condition
2 parents fcb0e9d + ada4ddf commit df058ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Services/MemoryService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function format(int $bytes): string
3838
{
3939
foreach ($this->sizes as $unit => $value) {
4040
if ($bytes >= $value) {
41-
return sprintf('%.2f %s', $bytes >= 1024 ? $bytes / $value : $bytes, $unit);
41+
return sprintf('%.2f %s', $bytes / $value, $unit);
4242
}
4343
}
4444

0 commit comments

Comments
 (0)