-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify iterable type #1140
Specify iterable type #1140
Conversation
This will help static analysis tools to understand the iterable type of `Collection`
What's missing here to merge? :) |
I must admit I don't know that Could someone give some documentation and context about what this PR actually does ? |
In my understanding: |
yes, So what this PR does is to tell SA tools (and PHPStorm) that Here it's an example using this: https://phpstan.org/r/ba1d6a3e-ba61-42db-9dde-a14169708c8b so when you are iterating it for example, you know that each item is a PS: It would be nice to add a phpstan or psalm to the repository, but that's another PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the explanation!
I'll merge it and add PHPStan in the next few days.
Working on adding PHPStan in #1193 |
This will help static analysis tools to understand the iterable type of
Collection