phpstan-symfony
phpstan-symfony copied to clipboard
Add support for InputInterface::getOption('x'|'y'|'z')
When you pass a variable getOption($optName) and $optName is a set of multiple string literals, it should still be possible to resolve the type(s).
It seems fairly easy to tweak https://github.com/phpstan/phpstan-symfony/blob/7953474b9af0872baaa469ddd041887aba0a3a63/src/Type/Symfony/InputInterfaceGetOptionDynamicReturnTypeExtension.php#L56-L85 to do a loop and concat all the different types instead of returning early a mixed here.
I may try to do this one day, but tonight no time so adding a note here.