Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored and github-actions[bot] committed Feb 21, 2024
1 parent 81b58bb commit ca6872a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/PausePrompt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
5 changes: 3 additions & 2 deletions src/Themes/Default/PausePromptRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit ca6872a

Please sign in to comment.