Skip to content

Conversation

faizanakram99
Copy link
Contributor

No description provided.

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

X and Y were meant to be just placeholders, you should type what it's really iterating over.

@faizanakram99
Copy link
Contributor Author

faizanakram99 commented Jan 25, 2021

X and Y were meant to be just placeholders, you should type what it's really iterating over.

yep, forgot to add @template 😅
Fixed

@ondrejmirtes
Copy link
Member

This will just cause another error when you typehint the interface. I suppose the iterated types are always the same, check out the implementations what's going on in them.

@faizanakram99
Copy link
Contributor Author

This will just cause another error when you typehint the interface. I suppose the iterated types are always the same, check out the implementations what's going on in them.

You're right, it showed implementations should be contravariant with parent errors.
From the implementations it looks like key is always integer and value is always string, fixed.

Thank you

@ondrejmirtes ondrejmirtes merged commit 857d958 into phpstan:master Jan 25, 2021
@ondrejmirtes
Copy link
Member

Thank you!

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