Skip to content

Conversation

VincentLanglet
Copy link
Contributor

No description provided.

@VincentLanglet
Copy link
Contributor Author

I don't understand the failure @ondrejmirtes

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe i'm misunderstanding something here, but array_rand returns a random key right?

So the return type here would a int, as this array is a list:
https://3v4l.org/H1hqZ

Copy link
Contributor

Choose a reason for hiding this comment

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

Prehaps this could also check if the value is bigger than the array size: https://3v4l.org/LYSTs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And how do you get the size of the array ?

@ondrejmirtes ondrejmirtes merged commit 930560e into phpstan:master Jan 10, 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.

3 participants