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

added sizeof() as alias of count() for Smaller/SmallerOrEqual #648

Merged
merged 6 commits into from Aug 27, 2021

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 27, 2021

triggered by #647 (comment)

@staabm staabm marked this pull request as ready for review August 27, 2021 08:29
@staabm
Copy link
Contributor Author

staabm commented Aug 27, 2021

the latest commit covers another case regarding 0 != count(), regarding non-empty-array type

@staabm staabm changed the title added sizeof as alias of count for Smaller/SmallerOrEqual added sizeof() as alias of count for Smaller/SmallerOrEqual Aug 27, 2021
@staabm staabm changed the title added sizeof() as alias of count for Smaller/SmallerOrEqual added sizeof() as alias of count() for Smaller/SmallerOrEqual Aug 27, 2021
function doFoo3(array $arr): string
{
if (0 != count($arr)) {
assertType('string', reset($arr));
assertType('array&nonEmpty', $arr);
Copy link
Member

Choose a reason for hiding this comment

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

This is basically deleting an existing test. Please add additional line instead of deleting this.

Copy link
Member

Choose a reason for hiding this comment

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

Oh sorry, I misread the commit history, it's fine.

@ondrejmirtes ondrejmirtes merged commit cee5bbe into phpstan:master Aug 27, 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
3 participants