Skip to main content

Return of boolean expressions should not be wrapped into an "if-then-else" statement

Return of boolean literal statements wrapped into IF-THEN-ELSE ones should be simplified.

Noncompliant Code Example

IF expression THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;

Compliant Solution

RETURN expression;