Skip to content

Commit

Permalink
Merge pull request #587 from ergebnis/feature/single-class-element-pe…
Browse files Browse the repository at this point in the history
…r-statement

Enhancement: Configure `single_class_element_per_statement` fixer to enforce single class element for `const` statements
  • Loading branch information
localheinz authored Mar 8, 2022
2 parents 7de9a2c + 02b5460 commit 1cf86d0
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ For a full diff see [`4.2.0...main`][4.2.0...main].
- Configured `no_unneeded_control_parentheses` fixer to include additional statements ([#583]), by [@localheinz]
- Configured `ordered_class_elements` fixer to order more elements ([#584]), by [@localheinz]
- Configured `phpdoc_align` fixer to align more tags ([#586]), by [@localheinz]
- Configured `single_class_element_per_statement` fixer to enforce single class element for `const` statements ([#587]), by [@localheinz]

## [`4.2.0`][4.2.0]

Expand Down Expand Up @@ -609,6 +610,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#583]: https://github.com/ergebnis/php-cs-fixer-config/pull/583
[#584]: https://github.com/ergebnis/php-cs-fixer-config/pull/584
[#586]: https://github.com/ergebnis/php-cs-fixer-config/pull/586
[#587]: https://github.com/ergebnis/php-cs-fixer-config/pull/587

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
1 change: 1 addition & 0 deletions src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ final class Php74 extends AbstractRuleSet implements ExplicitRuleSet
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => [
'const',
'property',
],
],
Expand Down
1 change: 1 addition & 0 deletions src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => [
'const',
'property',
],
],
Expand Down
1 change: 1 addition & 0 deletions src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ final class Php81 extends AbstractRuleSet implements ExplicitRuleSet
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => [
'const',
'property',
],
],
Expand Down
1 change: 1 addition & 0 deletions test/Unit/RuleSet/Php74Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ final class Php74Test extends ExplicitRuleSetTestCase
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => [
'const',
'property',
],
],
Expand Down
1 change: 1 addition & 0 deletions test/Unit/RuleSet/Php80Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ final class Php80Test extends ExplicitRuleSetTestCase
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => [
'const',
'property',
],
],
Expand Down
1 change: 1 addition & 0 deletions test/Unit/RuleSet/Php81Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ final class Php81Test extends ExplicitRuleSetTestCase
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => [
'elements' => [
'const',
'property',
],
],
Expand Down

0 comments on commit 1cf86d0

Please sign in to comment.