Skip to content

Commit bd64617

Browse files
authored
Update style.rst
"ask" signature expects a string as second parameter public function ask(string $question, string $default = null, callable $validator = null): mixed
1 parent aee9618 commit bd64617

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console/style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ User Input Methods
278278
In case you need to validate the given value, pass a callback validator as
279279
the third argument::
280280

281-
$io->ask('Number of workers to start', 1, function ($number) {
281+
$io->ask('Number of workers to start', '1', function ($number) {
282282
if (!is_numeric($number)) {
283283
throw new \RuntimeException('You must type a number.');
284284
}

0 commit comments

Comments
 (0)