
Rule control_structure_braces
ΒΆ
The body of each control structure MUST be enclosed within braces.
ExamplesΒΆ
Example #1ΒΆ
--- Original
+++ New
<?php
-if (foo()) echo 'Hello!';
+if (foo()) { echo 'Hello!'; }
Rule setsΒΆ
The rule is part of the following rule sets:
Source classΒΆ
PhpCsFixer\Fixer\ControlStructure\ControlStructureBracesFixer