By PMD you mean PHP Mess Detector?
If so, since you have a setup with Jenkins and PHP Mess Detector, I assume you actually care about code smells and readability.
With that in mind, my advice to you is: rename all of your boolean methods to follow the isSomething()
or hasSomething()
conventions.
Its important to notice though what code convention guide you follow.
That is very simple and quick to achieve, and will give you lots of benefits, such as:
Possible bugs. Bugs are not always wrongly written code. A lot of times, poor conditions or bad management of scope can generate pretty hard to find bugs.
Suboptimal code. Bad looking code can and most likely will be dificult to read. This is suboptimal code.
Overcomplicated expressions
- Unused parameters, methods or properties