Skip to content

Commit 7ce7891

Browse files
Robert Purcellgrogy
Robert Purcell
authored andcommitted
Align the percentage output
Left pad with whitespace so that the 100% line doesn't pop out of alignment.
1 parent 545ee3c commit 7ce7891

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Outputs/TextOutput.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ protected function writeMark($type)
194194

195195
protected function writePercent()
196196
{
197-
$percent = floor($this->checkedFiles / $this->totalFileCount * 100);
197+
$percent = $this->stringWidth(floor($this->checkedFiles / $this->totalFileCount * 100), 3);
198198
$current = $this->stringWidth($this->checkedFiles, strlen($this->totalFileCount));
199-
$this->writeLine(" $current/$this->totalFileCount ($percent %)");
199+
$this->writeLine(" $current/$this->totalFileCount ($percent%)");
200200
}
201201

202202
/**

0 commit comments

Comments
 (0)