Skip to content

Commit

Permalink
Merge pull request #1007 from ergebnis/feature/phpdoc-list-type
Browse files Browse the repository at this point in the history
Enhancement: Enable `phpdoc_list_type` fixer
  • Loading branch information
localheinz committed Feb 2, 2024
2 parents 6adcd0f + 16c0acc commit 4f20299
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 78 deletions.
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.20.0...main`][6.20.0...main].

- Updated `kubawerlos/php-cs-fixer-custom-fixers` ([#996]), by [@dependabot]
- Updated `friendsofphp/php-cs-fixer` ([#1005]), by [@dependabot]
- Enabled the `phpdoc_list_type` instead of the `PhpCsFixerCustomFixers/phpdoc_type_list` fixer ([#1006]), by [@localheinz]

### Fixed

Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -590,7 +588,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -591,7 +589,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php55.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -597,7 +595,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php56.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -597,7 +595,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php70.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -595,7 +593,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -597,7 +595,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php72.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -597,7 +595,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -597,7 +595,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -57,7 +56,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -597,7 +595,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -62,7 +61,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -607,7 +605,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -62,7 +61,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -609,7 +607,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -62,7 +61,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -609,7 +607,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php83.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static function create(): RuleSet
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -62,7 +61,6 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -609,7 +607,7 @@ public static function create(): RuleSet
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions test/Unit/RuleSet/Php53Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ protected function expectedCustomFixers(): Fixers
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
);
Expand Down Expand Up @@ -80,7 +79,6 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -613,7 +611,7 @@ protected function expectedRules(): Rules
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
4 changes: 1 addition & 3 deletions test/Unit/RuleSet/Php54Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ protected function expectedCustomFixers(): Fixers
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\NoImportFromGlobalNamespaceFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
);
Expand Down Expand Up @@ -80,7 +79,6 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/no_import_from_global_namespace' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -614,7 +612,7 @@ protected function expectedRules(): Rules
'method' => 'multi',
'property' => 'multi',
],
'phpdoc_list_type' => false,
'phpdoc_list_type' => true,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => [
'replacements' => [
Expand Down
Loading

0 comments on commit 4f20299

Please sign in to comment.