Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) edition

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