Skip to content

Commit

Permalink
Enhancement: Enable and configure PhpCsFixerCustomFixers/multiline_pr…
Browse files Browse the repository at this point in the history
…omoted_properties fixer
  • Loading branch information
localheinz committed Jan 4, 2024
1 parent fc59191 commit 8378276
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For a full diff see [`6.18.0...main`][6.18.0...main].
### Changed

- Enabled the `PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone` fixer ([#974]), by [@localheinz]
- Enabled the `PhpCsFixerCustomFixers/multiline_promoted_properties` fixer ([#975]), by [@localheinz]

## [`6.18.0`][6.18.0]

Expand Down Expand Up @@ -1484,6 +1485,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#972]: https://github.com/ergebnis/php-cs-fixer-config/pull/972
[#973]: https://github.com/ergebnis/php-cs-fixer-config/pull/973
[#974]: https://github.com/ergebnis/php-cs-fixer-config/pull/974
[#975]: https://github.com/ergebnis/php-cs-fixer-config/pull/975

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static function create(): RuleSet
return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -47,6 +48,10 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static function create(): RuleSet
return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -47,6 +48,10 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static function create(): RuleSet
return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -47,6 +48,10 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions src/RuleSet/Php83.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static function create(): RuleSet
return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -47,6 +48,10 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions test/Unit/RuleSet/Php80Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -70,6 +71,10 @@ protected function expectedRules(): Rules
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions test/Unit/RuleSet/Php81Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -70,6 +71,10 @@ protected function expectedRules(): Rules
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions test/Unit/RuleSet/Php82Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -70,6 +71,10 @@ protected function expectedRules(): Rules
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
5 changes: 5 additions & 0 deletions test/Unit/RuleSet/Php83Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -70,6 +71,10 @@ protected function expectedRules(): Rules
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/multiline_promoted_properties' => [
'keep_blank_lines' => false,
'minimum_number_of_parameters' => 2,
],
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down

0 comments on commit 8378276

Please sign in to comment.