Skip to content

Commit

Permalink
Merge pull request #977 from ergebnis/feature/no-duplicated-imports
Browse files Browse the repository at this point in the history
Enhancement: Enable `PhpCsFixerCustomFixers/no_duplicated_imports` fixer
  • Loading branch information
localheinz authored Jan 4, 2024
2 parents 8f35865 + d5ad81c commit 6df6da4
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For a full diff see [`6.18.0...main`][6.18.0...main].
- Enabled the `PhpCsFixerCustomFixers/multiline_comment_opening_closing_alone` fixer ([#974]), by [@localheinz]
- Enabled the `PhpCsFixerCustomFixers/multiline_promoted_properties` fixer ([#975]), by [@localheinz]
- Enabled the `PhpCsFixerCustomFixers/no_duplicated_array_key` fixer ([#976]), by [@localheinz]
- Enabled the `PhpCsFixerCustomFixers/no_duplicated_imports` fixer ([#977]), by [@localheinz]

## [`6.18.0`][6.18.0]

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

[@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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -35,6 +35,7 @@ public static function create(): RuleSet
Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -51,6 +52,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -36,6 +36,7 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -56,6 +57,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -36,6 +36,7 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -56,6 +57,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -36,6 +36,7 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -56,6 +57,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -36,6 +36,7 @@ public static function create(): RuleSet
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\MultilinePromotedPropertiesFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand All @@ -56,6 +57,7 @@ public static function create(): RuleSet
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -41,6 +41,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => 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 @@ -46,6 +46,7 @@ protected function expectedCustomFixers(): Fixers
return Fixers::fromFixers(
new Fixer\MultilineCommentOpeningClosingAloneFixer(),
new Fixer\NoDuplicatedArrayKeyFixer(),
new Fixer\NoDuplicatedImportsFixer(),
new Fixer\PhpdocArrayStyleFixer(),
new Fixer\PhpdocTypeListFixer(),
new PhpCsFixer\Whitespace\LineBreakAfterStatementsFixer(),
Expand Down Expand Up @@ -74,6 +75,7 @@ protected function expectedRules(): Rules
'PhpCsFixerCustomFixers/no_duplicated_array_key' => [
'ignore_expressions' => true,
],
'PhpCsFixerCustomFixers/no_duplicated_imports' => true,
'PhpCsFixerCustomFixers/phpdoc_array_style' => true,
'PhpCsFixerCustomFixers/phpdoc_type_list' => true,
'align_multiline_comment' => [
Expand Down
Loading

0 comments on commit 6df6da4

Please sign in to comment.