From 4880e6921ab226b14d8600e9ebb983b845331c75 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Thu, 13 Oct 2022 23:49:52 +0300 Subject: [PATCH] Added captions --- src/Processors/Migrate.php | 6 ++++++ src/Processors/Rollback.php | 6 ++++++ src/Processors/Status.php | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/Processors/Migrate.php b/src/Processors/Migrate.php index b3dc1a84..087fce47 100644 --- a/src/Processors/Migrate.php +++ b/src/Processors/Migrate.php @@ -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, [ diff --git a/src/Processors/Rollback.php b/src/Processors/Rollback.php index f200ee51..643e6b6a 100644 --- a/src/Processors/Rollback.php +++ b/src/Processors/Rollback.php @@ -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'); @@ -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) { diff --git a/src/Processors/Status.php b/src/Processors/Status.php index 2effca8d..10741428 100644 --- a/src/Processors/Status.php +++ b/src/Processors/Status.php @@ -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); }