diff --git a/src/Style/DrushStyle.php b/src/Style/DrushStyle.php index c09c92efbd..aade71c683 100644 --- a/src/Style/DrushStyle.php +++ b/src/Style/DrushStyle.php @@ -9,7 +9,7 @@ class DrushStyle extends SymfonyStyle { - public function confirm($question, $default = true): bool + public function confirm(string $question, bool $default = true): bool { // Automatically accept confirmations if the --yes argument was supplied. if (Drush::affirmative()) { @@ -23,7 +23,7 @@ public function confirm($question, $default = true): bool return parent::confirm($question, $default); } - public function choice($question, array $choices, $default = null) + public function choice(string $question, array $choices, mixed $default = null): mixed { // Display the choices without their keys. $choices_values = array_values($choices); @@ -32,17 +32,17 @@ public function choice($question, array $choices, $default = null) return array_search($return, $choices); } - public function warning($message): void + public function warning(string|array $message) { $this->block($message, 'WARNING', 'fg=black;bg=yellow', ' ! ', true); } - public function note($message): void + public function note(string|array $message) { $this->block($message, 'NOTE', 'fg=black;bg=yellow', ' ! '); } - public function caution($message): void + public function caution(string|array $message) { $this->block($message, 'CAUTION', 'fg=black;bg=yellow', ' ! ', true); }