Make possible return type in `IOInterface::select()` more explicit (#11171)
`IOInterface::select()` either returns any of `int`, `string`, `bool` or an array of `string` values. However, since the returned array is always a list, we can safely change the return type annotation to `list<string>`, making it more explicit in terms of static code analysis.pull/11229/head
parent
bd6a5019b3
commit
0cf57255d4
|
@ -191,7 +191,7 @@ interface IOInterface extends LoggerInterface
|
|||
* @param bool $multiselect Select more than one value separated by comma
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return int|string|string[]|bool The selected value or values (the key of the choices array)
|
||||
* @return int|string|list<string>|bool The selected value or values (the key of the choices array)
|
||||
*/
|
||||
public function select(string $question, array $choices, $default, $attempts = false, string $errorMessage = 'Value "%s" is invalid', bool $multiselect = false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue