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

isJsonString should implicitly assert value is of string type #9

Merged
merged 2 commits into from
Oct 10, 2019
Merged

isJsonString should implicitly assert value is of string type #9

merged 2 commits into from
Oct 10, 2019

Conversation

simPod
Copy link
Contributor

@simPod simPod commented Oct 9, 2019

When this assert passes, it's clear the value is string. IMO should be stripped of eg. null

@simPod
Copy link
Contributor Author

simPod commented Oct 9, 2019

tests fail but I don't think it's related

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.

Please update all the callbacks so that they don't have null in their return typehint and the build is green :) Ideally as a new commit, thanks!

src/Type/BeberleiAssert/AssertHelper.php Outdated Show resolved Hide resolved
@ondrejmirtes
Copy link
Member

Love it, thank you!

@ondrejmirtes ondrejmirtes merged commit 07b88f8 into phpstan:master Oct 10, 2019
@simPod simPod deleted the assert-string-isJsonString branch October 10, 2019 07:58
@ondrejmirtes
Copy link
Member

Released as 0.11.2.

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.

None yet

2 participants