Conditional return type for `IOInterface::select()` (#11219)
parent
6d1b36be3b
commit
a94a7512d6
|
@ -191,7 +191,9 @@ interface IOInterface extends LoggerInterface
|
|||
* @param bool $multiselect Select more than one value separated by comma
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return int|string|list<string>|bool The selected value or values (the key of the choices array)
|
||||
* @phpstan-return ($multiselect is true ? list<string> : string|int|bool)
|
||||
*/
|
||||
public function select(string $question, array $choices, $default, $attempts = false, string $errorMessage = 'Value "%s" is invalid', bool $multiselect = false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue