Skip to content

Commit

Permalink
Merge pull request #92 from TheDragonCode/3.x
Browse files Browse the repository at this point in the history
Added captions
  • Loading branch information
andrey-helldar authored Oct 13, 2022
2 parents 6ec0b0d + 4880e69 commit bcde514
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Processors/Migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ class Migrate extends Processor
public function handle(): void
{
$this->ensureRepository();
$this->showCaption();
$this->runActions($this->getCompleted());
}

protected function showCaption(): void
{
$this->notification->info('Launching Actions');
}

protected function ensureRepository(): void
{
$this->runCommand(Names::INSTALL, [
Expand Down
6 changes: 6 additions & 0 deletions src/Processors/Rollback.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function handle(): void
if ($actions = $this->getActions($this->options->step)) {
$this->fireEvent(ActionStarted::class, 'down');

$this->showCaption();
$this->run($actions);

$this->fireEvent(ActionEnded::class, 'down');
Expand All @@ -31,6 +32,11 @@ public function handle(): void
$this->fireEvent(NoPendingActions::class, 'down');
}

protected function showCaption(): void
{
$this->notification->info('Rollback Actions');
}

protected function run(array $actions): void
{
foreach ($actions as $row) {
Expand Down
6 changes: 6 additions & 0 deletions src/Processors/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ public function handle(): void
}

$this->showCaption();
$this->showHeaders();
$this->showStatus($files, $completed);
}

protected function showCaption(): void
{
$this->notification->info('Show Status');
}

protected function showHeaders(): void
{
$this->notification->twoColumn($this->columnName, $this->columnStatus);
}
Expand Down

0 comments on commit bcde514

Please sign in to comment.