Skip to content

Commit 14d8fda

Browse files
committed
Add new helper method showPressAnyKeyToContinue
1 parent 4845338 commit 14d8fda

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Helpers/CommandHelper.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ protected function getOrAskConnectionName(): string
8787
return $connectionName;
8888
}
8989

90+
protected function showPressAnyKeyToContinue(?string $text = null): void
91+
{
92+
$this->output->writeln($text ?? 'Press any key to continue...');
93+
94+
$question = new Question('');
95+
$question->setHidden(true);
96+
$question->setHiddenFallback(false);
97+
$question->setValidator(fn ($answer) => true);
98+
(new QuestionHelper())->ask($this->input, $this->output, $question);
99+
}
100+
101+
90102
protected function clear(): void
91103
{
92104
system('clear');

0 commit comments

Comments
 (0)