Skip to content

Commit

Permalink
Fixed progress output when the run completes at a wrap boundary (ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Sep 7, 2020
1 parent 1371c59 commit a9cf57e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,10 @@ public function printProgress(File $file, $numFiles, $numProcessed)

$percent = round(($numProcessed / $numFiles) * 100);
$padding = (strlen($numFiles) - strlen($numProcessed));
if ($numProcessed === $numFiles && $numFiles > $numPerLine) {
if ($numProcessed === $numFiles
&& $numFiles > $numPerLine
&& ($numProcessed % $numPerLine) !== 0
) {
$padding += ($numPerLine - ($numFiles - (floor($numFiles / $numPerLine) * $numPerLine)));
}

Expand Down

0 comments on commit a9cf57e

Please sign in to comment.