Skip to content

Commit

Permalink
feat: Report used memory to 2 decimal digits only (#8017)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed May 16, 2024
1 parent 61caa3a commit 731fdd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Console/Report/FixReport/TextReporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private function getFooter(int $time, int $identifiedFiles, int $files, int $mem
}

return PHP_EOL.sprintf(
'%s %d of %d %s in %.3f seconds, %.3f MB memory used'.PHP_EOL,
'%s %d of %d %s in %.3f seconds, %.2f MB memory used'.PHP_EOL,
$isDryRun ? 'Found' : 'Fixed',
$identifiedFiles,
$files,
Expand Down
4 changes: 2 additions & 2 deletions tests/Console/Report/FixReport/TextReporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Foo
----------- end diff -----------
Fixed 1 of 10 files in 1.234 seconds, 2.500 MB memory used
Fixed 1 of 10 files in 1.234 seconds, 2.50 MB memory used
TEXT
);
Expand All @@ -142,7 +142,7 @@ protected static function createComplexReport(): string
<comment> ----------- end diff -----------</comment>
Found 2 of 10 files that can be fixed in 1.234 seconds, 2.500 MB memory used
Found 2 of 10 files that can be fixed in 1.234 seconds, 2.50 MB memory used
TEXT
);
Expand Down

0 comments on commit 731fdd2

Please sign in to comment.