Skip to content
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

fix: PHPStan detecting type correctly after usage of Assert::assertIsList #6027

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mitelg
Copy link

@mitelg mitelg commented Nov 12, 2024

Hey there,

recently I found that the assertIsList method does not tell PHPStan correctly that the variable is of type list afterwards. This PR is fixing that.

I wanted to add this to 10.5 branch first, but I saw, that there are not phpstan-assert annotations at all, so I was not sure, if that was reasonable.

This is my first contribution here, so I hope, I did everything correct. Not sure, if I need a test for this

See phpstan/phpstan-phpunit#212 for reference

Copy link
Contributor

@staabm staabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants