I would think, actually, that there should already be a generic sniff for this. I can't seem to find one among https://github.com/squizlabs/PHP_CodeSniffer/tree/master/CodeSniffer/Standards
Add sniff to disallow omission of braces for single line blocks, closes
@westonruter Opened a ticket at PHPCS to adopt as a generic sniff.
@westonruter Seems there is one after all at https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/ControlStructures/InlineControlStructureSniff.php
So we only need to add it to our ruleset.
@shadyvb great! So we can add it to https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/master/ruleset.xml
As well, we can add the other such rules from https://github.com/x-team/wp-plugin-dev-lib/blob/master/phpcs.ruleset.xml
+1 for this.
Added in #127