From fbb9fcb3e522f8292d6d2250c599dcf86407a657 Mon Sep 17 00:00:00 2001 From: Xavier RIGAL <295150+lougaou@users.noreply.github.com> Date: Sun, 19 Mar 2023 09:34:07 +0100 Subject: [PATCH] Update style.rst "ask" signature expects a string as second parameter public function ask(string $question, string $default = null, callable $validator = null): mixed --- console/style.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/style.rst b/console/style.rst index 4a10639aee6..fc94a1be4db 100644 --- a/console/style.rst +++ b/console/style.rst @@ -286,7 +286,7 @@ User Input Methods In case you need to validate the given value, pass a callback validator as the third argument:: - $io->ask('Number of workers to start', 1, function ($number) { + $io->ask('Number of workers to start', '1', function ($number) { if (!is_numeric($number)) { throw new \RuntimeException('You must type a number.'); }