You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose a sniff that detects empty if and else blocks, since they never make any sense. Adding a comment inside the empty block would suppress the error, similar to DisallowEmptyFunctionSniff.
Empty elseif blocks can sometimes make sense if followed by other elseifs or an else.
Perhaps the sniff could even be fixable by extracting side-effects of the condition, however, it would be more useful if we can detect whether there are any side-effects at all, which I'm not sure is possible in phpcs.