Skip to content

Enable control_structure_braces #6479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

paulbalandan
Copy link
Member

Description

$ vendor/bin/php-cs-fixer describe control_structure_braces        
Description of control_structure_braces rule.
The body of each control structure MUST be enclosed within braces.

Fixing examples:
 * Example #1.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,2 +1,2 @@
    <?php
   -if (foo()) echo 'Hello!';
   +if (foo()) { echo 'Hello!'; }

   ----------- end diff -----------

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner
Copy link
Member

MGatner commented Sep 4, 2022

These all look good to me. The Config file changes are going to conflict for each of them so I'm fine if you want to roll them up into one or just merge+rebase each on your own.

@paulbalandan
Copy link
Member Author

I'll just rebase each approved.

@paulbalandan paulbalandan force-pushed the control-structure-braces branch from 51136e0 to b5929a9 Compare September 4, 2022 11:39
@paulbalandan
Copy link
Member Author

Failing CS fixed in #6491

@paulbalandan paulbalandan force-pushed the control-structure-braces branch from b5929a9 to 50dc13d Compare September 4, 2022 11:49
@paulbalandan paulbalandan merged commit c261861 into codeigniter4:develop Sep 4, 2022
@paulbalandan paulbalandan deleted the control-structure-braces branch September 4, 2022 12:12
paulbalandan added a commit to CodeIgniter/coding-standard that referenced this pull request Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants