Return of boolean literal statements wrapped into if-then-else ones should be simplified.
For example, the following code:
if (someBooleanMethod()) { // Non-Compliant return true; } else { return false; }
should be refactored into:
return someBooleanMethod(); // Compliant
and, the following code:
if (someBooleanMethod()) { // Non-Compliant return false; } else { return true; }
should be refactored into:
return !someBooleanMethod(); // Compliant