Skip to content

Commit fbb9fcb

Browse files
lougaoujaviereguiluz
authored andcommitted
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 ceb0df5 commit fbb9fcb

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
@@ -286,7 +286,7 @@ User Input Methods
286286
In case you need to validate the given value, pass a callback validator as
287287
the third argument::
288288

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

0 commit comments

Comments
 (0)