phpstan/phpstan-beberlei-assert

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

lcobucci opened this issue · 2 comments

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?

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!

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.