Skip to content

Commit

Permalink
Merge pull request #1023 from ergebnis/feature/phpdoc-array-type
Browse files Browse the repository at this point in the history
Enhancement: Enable `phpdoc_array_type` instead of `PhpCsFixerCustomFixers/phpdoc_array_style` fixer
  • Loading branch information
localheinz authored Feb 24, 2024
2 parents c16ce3a + 0aa010f commit b3f9e4f
Show file tree
Hide file tree
Showing 27 changed files with 28 additions and 78 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.22.0...main`][6.22.0...main].
### Changed

- Updated `friendsofphp/php-cs-fixer` ([#1021]), by [@dependabot]
- Enabled the `phpdoc_array_type` instead of the `PhpCsFixerCustomFixers/phpdoc_array_style` fixer ([#1022]), by [@localheinz]

## [`6.22.0`][6.22.0]

Expand Down Expand Up @@ -1553,6 +1554,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#1009]: https://github.com/ergebnis/php-cs-fixer-config/pull/1009
[#1010]: https://github.com/ergebnis/php-cs-fixer-config/pull/1010
[#1021]: https://github.com/ergebnis/php-cs-fixer-config/pull/1021
[#1022]: https://github.com/ergebnis/php-cs-fixer-config/pull/1022

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php53.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -547,7 +545,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php54.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -548,7 +546,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php55.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -554,7 +552,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php56.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -554,7 +552,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php70.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -552,7 +550,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -554,7 +552,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php72.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -554,7 +552,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -554,7 +552,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -53,7 +52,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -554,7 +552,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php80.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static function create(): RuleSet
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -58,7 +57,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -564,7 +562,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php81.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static function create(): RuleSet
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -58,7 +57,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -566,7 +564,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php82.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static function create(): RuleSet
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -58,7 +57,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -566,7 +564,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
4 changes: 1 addition & 3 deletions src/RuleSet/Php83.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static function create(): RuleSet
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
),
Expand All @@ -58,7 +57,6 @@ public static function create(): RuleSet
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -566,7 +564,7 @@ public static function create(): RuleSet
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
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 @@ -47,7 +47,6 @@ protected function expectedCustomFixers(): Fixers
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
);
Expand Down Expand Up @@ -76,7 +75,6 @@ protected function expectedRules(): Rules
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -570,7 +568,7 @@ protected function expectedRules(): Rules
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
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 @@ -47,7 +47,6 @@ protected function expectedCustomFixers(): Fixers
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypesCommaSpacesFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
);
Expand Down Expand Up @@ -76,7 +75,6 @@ protected function expectedRules(): Rules
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_types_comma_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
Expand Down Expand Up @@ -571,7 +569,7 @@ protected function expectedRules(): Rules
],
],
'phpdoc_annotation_without_dot' => true,
'phpdoc_array_type' => false,
'phpdoc_array_type' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => [
'tags' => [
Expand Down
Loading

0 comments on commit b3f9e4f

Please sign in to comment.