framework
framework copied to clipboard
[9.x] Mistake in console choice phpdoc
Writing a console command, there is a function $this->choice(). The $default property should be the default key as described in the Laravel documentation, which is int and not string.
When choice is passed an associated array, a string is a valid value here.
$day = $this->choice(
'What day is it?',
[
'mon' => 'Monday',
'tues' => 'Tuesday'
],
'mon'
);
Likely, it should be null|string|int
Thanks!