From ca6872ab6aec3ab61db3a61f83a6caf764ec7781 Mon Sep 17 00:00:00 2001 From: taylorotwell Date: Wed, 21 Feb 2024 19:25:27 +0000 Subject: [PATCH] Fix code styling --- src/PausePrompt.php | 5 +++-- src/Themes/Default/PausePromptRenderer.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/PausePrompt.php b/src/PausePrompt.php index 65605d58..5556aa54 100644 --- a/src/PausePrompt.php +++ b/src/PausePrompt.php @@ -7,11 +7,12 @@ class PausePrompt extends Prompt /** * Create a new PausePrompt instance. */ - public function __construct(public string $message = 'Press enter to continue...') { + public function __construct(public string $message = 'Press enter to continue...') + { $this->required = false; $this->validate = null; - $this->on('key', fn ($key) => match($key) { + $this->on('key', fn ($key) => match ($key) { Key::ENTER => $this->submit(), default => null, }); diff --git a/src/Themes/Default/PausePromptRenderer.php b/src/Themes/Default/PausePromptRenderer.php index 242be178..0e51081d 100644 --- a/src/Themes/Default/PausePromptRenderer.php +++ b/src/Themes/Default/PausePromptRenderer.php @@ -15,10 +15,11 @@ public function __invoke(PausePrompt $prompt): string { match ($prompt->state) { 'submit' => collect(explode(PHP_EOL, $prompt->message)) - ->each(fn($line) => $this->line($this->gray(" {$line}"))), + ->each(fn ($line) => $this->line($this->gray(" {$line}"))), default => collect(explode(PHP_EOL, $prompt->message)) - ->each(fn($line) => $this->line($this->green(" {$line}"))) + ->each(fn ($line) => $this->line($this->green(" {$line}"))) }; + return $this; } }