Skip to content

False positive on int values: Comparison operation ">" between int<min, 6> and 10 is always false #5656

@muxx

Description

@muxx

Bug report

This is logic of validation OKPO number of companies in Russia.

Here example where you can see than $i can be greater 10 and logic is correct http://sandbox.onlinephpfunctions.com/code/afa48ae0eed6e2bc2407cd23984dbee39a962098

Code snippet that reproduces the problem

https://phpstan.org/r/10a2ec68-73ad-4c97-90eb-a792e86e0872

Expected output

Don't show error

Did PHPStan help you today? Did it make you happy in any way?

Yes, of course!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions