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

allow numeric-strings beeing returned for non-empty-string #1428

Merged
merged 2 commits into from Jun 16, 2022

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jun 16, 2022

@staabm staabm marked this pull request as ready for review June 16, 2022 07:27
@@ -78,6 +78,10 @@ public function isSubTypeOf(Type $otherType): TrinaryLogic

public function isAcceptedBy(Type $acceptingType, bool $strictTypes): TrinaryLogic
{
if ($acceptingType->isNonEmptyString()->yes()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried adding this case in isSubTypeOf() instead, but this made other tests fail. therefore the fix looks like it is right now.

@ondrejmirtes ondrejmirtes merged commit 6696f45 into phpstan:1.7.x Jun 16, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the numeric-vs-non-empty branch June 18, 2022 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants