Open vm06007 opened 11 months ago
Team would like to stick to the original code without introducing ugly statement as ||
which makes it harder to read. Code accomplishs exactly same logic and does not have any advantage over outcome. Style-wise we prefer to have each statement explisit and not mixed.
WLL-01C: Inefficient Conditional Structure
Description:
The
WiseLowLevelHelper::_byPassCase
function will evaluate anif
conditional, yieldtrue
, evaluate another conditional, yieldtrue
, and ultimately yieldfalse
if neither of the aforementionedif
conditionals were evaluated totrue
.Example:
Recommendation:
We advise the code to instead
return
bothif
conditionals directly, joined via an ELSE (||
) logical operator.