-
-
Notifications
You must be signed in to change notification settings - Fork 946
Open
Labels
Description
Feature request
Psalm has a class-string-map type to represent cases where an array is a map between a class name (potentially restricted to a given type) as key and a value which type depends on that class name: https://psalm.dev/docs/annotating_code/type_syntax/utility_types/#class-string-mapt-of-foo-t
The most basic usage being that each value is an instance of the type available as key. But it could be more complex for values (for instance using list<T> for a list of instances of that type or even OtherType<T>).
It would be great if phpstan could have such a type (and ideally using the same syntax than psalm)
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable