Skip to content

Commit

Permalink
Merge pull request #973 from ergebnis/feature/phpdoc-type-list-fixer
Browse files Browse the repository at this point in the history
Enhancement: Enable `phpdoc_type_list`  fixer
  • Loading branch information
localheinz authored Jan 3, 2024
2 parents ebb5e51 + 616eb37 commit 375cf17
Show file tree
Hide file tree
Showing 28 changed files with 53 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ For a full diff see [`6.17.0...main`][6.17.0...main].

- Updated `kubawerlos/php-cs-fixer-custom-fixers` ([#970]), by [@dependabot]
- Updated `friendsofphp/php-cs-fixer` ([#971]), by [@dependabot]
- Enabled the [`PhpCsFixerCustomFixers/phpdoc_type_list_fixer`](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.18.0#phpdoctypelistfixer) fixer ([#972]), by [@localheinz]

## [`6.17.0`][6.17.0]

Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php53.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php54.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php55.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php56.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php70.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php71.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php72.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php73.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 additions & 0 deletions src/RuleSet/Php74.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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 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\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Name::fromString(\sprintf(
Expand All @@ -45,6 +46,7 @@ public static function create(): RuleSet
Rules::fromArray([
'ErickSkrauch/line_break_after_statements' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
1 change: 0 additions & 1 deletion test/Unit/RuleSet/AbstractRuleSetTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ final protected static function fixersThatAreRegistered(): array
$fixersThatAreBuiltIn = $fixerFactory->getFixers();
$fixersThatShouldBeRegistered = static::createRuleSet()->customFixers()->toArray();

/** @var array<Fixer\FixerInterface> $fixers */
$fixers = \array_merge(
$fixersThatAreBuiltIn,
$fixersThatShouldBeRegistered,
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -40,6 +40,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
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 @@ -45,6 +45,7 @@ protected function expectedCustomFixers(): Fixers
{
return Fixers::fromFixers(
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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
2 changes: 2 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\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/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
Expand Down
Loading

0 comments on commit 375cf17

Please sign in to comment.