Skip to content

Commit 10dfbe8

Browse files
committed
Align the percentage output
Left pad with whitespace so that the 100% line doesn't pop out of alignment.
1 parent 3b856f9 commit 10dfbe8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Output.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ protected function writeMark($type)
348348

349349
protected function writePercent()
350350
{
351-
$percent = floor($this->checkedFiles / $this->totalFileCount * 100);
351+
$percent = $this->stringWidth(floor($this->checkedFiles / $this->totalFileCount * 100), 3);
352352
$current = $this->stringWidth($this->checkedFiles, strlen($this->totalFileCount));
353-
$this->writeLine(" $current/$this->totalFileCount ($percent %)");
353+
$this->writeLine(" $current/$this->totalFileCount ($percent%)");
354354
}
355355

356356
/**

0 commit comments

Comments
 (0)