-
-
Notifications
You must be signed in to change notification settings - Fork 929
Open
phpstan/phpstan-src
#4414Description
Bug report
Since https://github.com/JetBrains/phpstorm-stubs/pull/1783/files, PHPStan now thinks array_combine throws a valueError even if it never does. (For instance https://phpstan.org/r/878b99ee-9004-430c-aea1-b706382196aa)
It could be useful to add a ArrayCombineFunctionThrowTypeExtension to reduce the false positive.
It would be similar to (and might use) ArrayCombineFunctionReturnTypeExtension.
It could also be great to support
array_combine(array_column($a, 'a'), array_column($a, 'b'))
but that's another topics.
Code snippet that reproduces the problem
https://phpstan.org/r/878b99ee-9004-430c-aea1-b706382196aa
Expected output
No errors
Did PHPStan help you today? Did it make you happy in any way?
No response
Metadata
Metadata
Assignees
Labels
No labels