Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /