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

Assert::that()->numeric() being marked as "always evaluate to true" #11

Closed
lcobucci opened this issue Mar 9, 2020 · 2 comments
Closed

Comments

@lcobucci
Copy link

lcobucci commented Mar 9, 2020

For the following code:

class Bar
{
    public function doBar(string $s)
    {
        Assert::that($s)->numeric();
    }
}

We're always getting the error:

# Call to method Assert\AssertionChain::numeric() will always evaluate to true.

I don't believe this is quite right, since we might have non-numeric strings, correct? Or are we doing something wrong?

@ondrejmirtes
Copy link
Member

Should be solved on dev-master of PHPStan (phpstan/phpstan-src@53a5171) :) I'll release it as 0.12.15 later today so please test it :) Thank you!

@github-actions
Copy link

github-actions bot commented May 1, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants