Skip to content

Commit

Permalink
fix: Improve progress bar visual layer (PHP-CS-Fixer#7708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk authored Jan 10, 2024
1 parent 42d0586 commit 4842c3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Console/Output/Progress/PercentageBarOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public function __construct(OutputContext $context)
$this->context = $context;

$this->progressBar = new ProgressBar($context->getOutput(), $this->context->getFilesCount());
$this->progressBar->setBarCharacter('');
$this->progressBar->setEmptyBarCharacter('');
$this->progressBar->setProgressCharacter('');
$this->progressBar->setBarCharacter(''); // dark shade character \u2593
$this->progressBar->setEmptyBarCharacter(''); // light shade character \u2591
$this->progressBar->setProgressCharacter('');
$this->progressBar->setFormat('normal');

$this->progressBar->start();
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Output/Progress/PercentageBarOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static function providePercentageBarProgressOutputCases(): iterable
[FixerFileProcessedEvent::STATUS_NO_CHANGES, 100],
],
' 0/100 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%'.PHP_EOL.
' 100/100 [████████████████████████████] 100%',
' 100/100 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%',
80,
];
}
Expand Down

0 comments on commit 4842c3e

Please sign in to comment.