Skip to content

Enable blank_line_between_import_groups #6478

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 blank_line_between_import_groups
Description of blank_line_between_import_groups rule.
Putting blank lines between `use` statement groups.

Fixing examples:
 * Example #1.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,5 +1,7 @@
    <?php

    use function AAC;
   +
    use const AAB;
   +
    use AAA;

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

 * Example #2.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,8 +1,10 @@
    <?php
    use const AAAA;
    use const BBB;
   +
    use Bar;
    use AAC;
    use Acme;
   +
    use function CCC\AA;
    use function DDD;

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

 * Example #3.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,8 +1,10 @@
    <?php
    use const BBB;
    use const AAAA;
   +
    use Acme;
    use AAC;
    use Bar;
   +
    use function DDD;
    use function CCC\AA;

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

 * Example #4.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,8 +1,13 @@
    <?php
    use const AAAA;
    use const BBB;
   +
    use Acme;
   +
    use function DDD;
   +
    use AAC;
   +
    use function CCC\AA;
   +
    use Bar;

   ----------- 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 MGatner merged commit e874fe6 into codeigniter4:develop Sep 4, 2022
@paulbalandan paulbalandan deleted the blank-line-between-import-groups branch September 4, 2022 11:29
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