
control_structure_braces
¶The body of each control structure MUST be enclosed within braces.
--- Original
+++ New
<?php
-if (foo()) echo 'Hello!';
+if (foo()) { echo 'Hello!'; }
The rule is part of the following rule sets:
Using the @PER rule set will enable the control_structure_braces
rule.
Using the @PSR2 rule set will enable the control_structure_braces
rule.
Using the @PSR12 rule set will enable the control_structure_braces
rule.
Using the @PhpCsFixer rule set will enable the control_structure_braces
rule.
Using the @Symfony rule set will enable the control_structure_braces
rule.