Skip to content

Commit

Permalink
Added empty line after progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Feb 3, 2023
1 parent 066fda8 commit 6baee40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Comparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Comparator
protected array $result = [];

public function __construct(
protected Runner $runner = new Runner(),
protected Runner $runner = new Runner(),
protected Transformer $transformer = new Transformer()
) {
$this->view = new View(new SymfonyStyle(
Expand Down Expand Up @@ -62,6 +62,7 @@ protected function withProgress(array $callbacks, int $count): void
$this->each($callbacks, $bar);

$bar->finish();
$this->view->emptyLine(2);
}

protected function stepsCount(array $callbacks): int
Expand Down
11 changes: 8 additions & 3 deletions src/Services/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class View
protected ProgressBar $progressBar;

public function __construct(
SymfonyStyle $io
protected SymfonyStyle $io
) {
$this->table = new Table($io);
$this->progressBar = new ProgressBar($io);
$this->table = new Table($this->io);
$this->progressBar = new ProgressBar($this->io);
}

public function table(array $data): void
Expand All @@ -30,4 +30,9 @@ public function progressBar(): ProgressBar
{
return $this->progressBar;
}

public function emptyLine(int $count = 1): void
{
$this->io->newLine($count);
}
}

0 comments on commit 6baee40

Please sign in to comment.