Skip to content

Commit

Permalink
Enhancement: Configure blank_line_before_statement fixer to include a…
Browse files Browse the repository at this point in the history
…dditional statements
  • Loading branch information
localheinz committed Mar 8, 2022
1 parent 196fda1 commit 979db8f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`4.2.0...main`][4.2.0...main].

### Changed

- Configured `blank_line_before_statement` fixer to include additional statements ([#581]), by [@localheinz]

## [`4.2.0`][4.2.0]

For a full diff see [`4.1.0...4.2.0`][4.1.0...4.2.0].
Expand Down Expand Up @@ -598,6 +602,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#578]: https://github.com/ergebnis/php-cs-fixer-config/pull/578
[#579]: https://github.com/ergebnis/php-cs-fixer-config/pull/579
[#580]: https://github.com/ergebnis/php-cs-fixer-config/pull/580
[#581]: https://github.com/ergebnis/php-cs-fixer-config/pull/581

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
3 changes: 3 additions & 0 deletions src/RuleSet/Php74.php
Expand Up @@ -36,6 +36,7 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
Expand All @@ -47,6 +48,7 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand All @@ -55,6 +57,7 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
'try',
'while',
'yield',
'yield_from',
],
],
'braces' => [
Expand Down
3 changes: 3 additions & 0 deletions src/RuleSet/Php80.php
Expand Up @@ -36,6 +36,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
Expand All @@ -47,6 +48,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand All @@ -55,6 +57,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'try',
'while',
'yield',
'yield_from',
],
],
'braces' => [
Expand Down
3 changes: 3 additions & 0 deletions src/RuleSet/Php81.php
Expand Up @@ -36,6 +36,7 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
Expand All @@ -47,6 +48,7 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand All @@ -55,6 +57,7 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet
'try',
'while',
'yield',
'yield_from',
],
],
'braces' => [
Expand Down
3 changes: 3 additions & 0 deletions test/Unit/RuleSet/Php74Test.php
Expand Up @@ -42,6 +42,7 @@ final class Php74Test extends ExplicitRuleSetTestCase
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
Expand All @@ -53,6 +54,7 @@ final class Php74Test extends ExplicitRuleSetTestCase
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand All @@ -61,6 +63,7 @@ final class Php74Test extends ExplicitRuleSetTestCase
'try',
'while',
'yield',
'yield_from',
],
],
'braces' => [
Expand Down
3 changes: 3 additions & 0 deletions test/Unit/RuleSet/Php80Test.php
Expand Up @@ -42,6 +42,7 @@ final class Php80Test extends ExplicitRuleSetTestCase
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
Expand All @@ -53,6 +54,7 @@ final class Php80Test extends ExplicitRuleSetTestCase
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand All @@ -61,6 +63,7 @@ final class Php80Test extends ExplicitRuleSetTestCase
'try',
'while',
'yield',
'yield_from',
],
],
'braces' => [
Expand Down
3 changes: 3 additions & 0 deletions test/Unit/RuleSet/Php81Test.php
Expand Up @@ -42,6 +42,7 @@ final class Php81Test extends ExplicitRuleSetTestCase
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
Expand All @@ -53,6 +54,7 @@ final class Php81Test extends ExplicitRuleSetTestCase
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
Expand All @@ -61,6 +63,7 @@ final class Php81Test extends ExplicitRuleSetTestCase
'try',
'while',
'yield',
'yield_from',
],
],
'braces' => [
Expand Down

0 comments on commit 979db8f

Please sign in to comment.