-
-
Notifications
You must be signed in to change notification settings - Fork 947
Types not being pulled from @phpstan-type correctly #6556
Copy link
Copy link
Closed
Labels
Milestone
Description
Bug report
When defining array structure with @phpstan-type, checking some keys using array_key_exists does not correctly determine the type associated.
Code snippet that reproduces the problem
https://phpstan.org/r/2f4d63e8-1e34-4f3d-8d6c-912db0cef960
Expected output
4PHPStan should be able to determine the types for all defined keys. If the keys in the array are not listed in the PHPStan type, it can determine which keys are missing (https://phpstan.org/r/286792cb-f9ef-4536-8751-84f86217ef69).
Did PHPStan help you today? Did it make you happy in any way?
I love PHPstan! It's helping me get my code ready for PHP8 and making it much easier!
Reactions are currently unavailable