-
Notifications
You must be signed in to change notification settings - Fork 506
non-empty-array<mixed> does not accept array with hasOffsetValue #3924
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
base: 2.1.x
Are you sure you want to change the base?
Conversation
This pull request has been marked as ready for review. |
if ($type instanceof HasOffsetType | ||
|| $type instanceof HasOffsetValueType | ||
) { | ||
return AcceptsResult::createYes(); | ||
} |
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.
I am not 100% sure on this fix, as the 2 types do not necessarily mean "offset on array".
did not find a better place to implement it though.
I see we have more todo here. a union of 2 non-empty-arrays with has-offset accessory atm is just |
closes phpstan/phpstan#12847