Codor icon indicating copy to clipboard operation
Codor copied to clipboard

Sniff for conditional complexity.

Open bmitch opened this issue 8 years ago • 3 comments

Checks if if statement has too many conditions.

bmitch avatar Dec 04 '16 21:12 bmitch

This issue is not resolved by https://github.com/bmitch/Codor/blob/master/src/Codor/Sniffs/ControlStructures/NestedIfSniff.php ?

kevin-schmitt avatar Feb 22 '22 16:02 kevin-schmitt

I think this new sniff would check if a single if contains too many conditions, like:

if ($cond1 && $cond2 && $cond3 /* and so on... */ && $cond42)

villfa avatar Feb 22 '22 16:02 villfa

Thanks,

Can you assign to me please ?

:)

kevin-schmitt avatar Feb 22 '22 17:02 kevin-schmitt