-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Description
Bug report
Hello 🙂
When calling array_map with a callable and a single array as parameter, the return is an array with the same keys than the given array. But, when calling array_map with several arrays, the return is always a list.
Unfortunately, PHPStan still consider the return of such array_map calls as an array<int, …>, and when we try to PHPDoc this to describe the elements of the array, we got a error.
If the issue is only about the CallMap classes, I could try to provide a PR, but if this is something from the engine to change, I won't be able to provide anything, I'm afraid.
Thanks for your amazing tool!
Code snippet that reproduces the problem
https://phpstan.org/r/7b54a0b2-0a6b-4304-a017-8e3f9e2d3372
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
No response
Metadata
Metadata
Assignees
Labels
No labels