1
0
Fork 0

Conditional return type for `IOInterface::select()` (#11219)

pull/11230/head
Markus Staab 2022-12-17 22:03:19 +01:00 committed by GitHub
parent 6d1b36be3b
commit a94a7512d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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);