I have a lot of while (1)
and if (1)
etc. in my code. PHPStan thinks these are errors, saying things such as While loop condition is always true.
or If condition is always true.
.
I don't want to turn off those errors, because there could be valid instances of them. For example, while ($some_var)
could always be true if I have a bug in my code, and that's something I definitely want to catch. I just want it to ignore those specific code strings, when I know for sure it's not an error but intentional.
How is this done? I've read the manual a lot but not found a way.