WordPress-Coding-Standards/Tests
jrfnl 92751a146a
Extra: do not allow ambiguous conditions
This new PHPCS 3.9.0 sniff will flag code which contains a `||` and a `&&` operator in the same condition and their precedence is not clarified via parenthesis.

This should allow for users of WPCS to find/prevent some bugs in code.

I'd personally would **_highly_** recommend for WP Core to also use this sniff, but I suspect that will need due discussion/Make post/handbook change.

Note: running this sniff on WP Core as-is, would (to my surprise) not actually trigger any new errors.

Includes updating a code snippet in the Ruleset test to comply.
2024-03-04 16:30:23 +01:00
..
RulesetCheck Extra: do not allow ambiguous conditions 2024-03-04 16:30:23 +01:00
bootstrap.php Tests: add a bootstrap file 2020-06-30 19:33:42 +02:00