Skip to content

Commit

Permalink
Merge pull request #974 from ergebnis/feature/multiline-comment-openi…
Browse files Browse the repository at this point in the history
…ng-closing-alone

Enhancement: Enable `PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone` fixer
  • Loading branch information
localheinz authored Jan 4, 2024
2 parents a3a83e7 + fc59191 commit 7a9143a
Show file tree
Hide file tree
Showing 27 changed files with 57 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
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 [`6.18.0...main`][6.18.0...main].

### Changed

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

## [`6.18.0`][6.18.0]

For a full diff see [`6.17.0...6.18.0`][6.17.0...6.18.0].
Expand Down Expand Up @@ -1479,6 +1483,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#971]: https://github.com/ergebnis/php-cs-fixer-config/pull/971
[#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

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php55.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php56.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php70.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php72.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php83.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static function create(): RuleSet

return RuleSet::create(
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
$phpVersion,
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php53Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php54Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php55Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ final class Php55Test extends ExplicitRuleSetTestCase
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php56Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php70Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php71Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php72Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php73Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php74Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
2 changes: 2 additions & 0 deletions test/Unit/RuleSet/Php80Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected static function createRuleSet(): RuleSet
protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -68,6 +69,7 @@ protected function expectedRules(): Rules
{
return Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
Loading

0 comments on commit 7a9143a

Please sign in to comment.