Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Configure phpdoc_add_missing_param_annotation fixer to add annotation for untyped parameters only #220

Merged
merged 2 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

For a full diff see [`2.4.0...main`][2.4.0...main].
For a full diff see [`2.5.0...main`][2.5.0...main].

## [`2.5.0`][2.5.0]

For a full diff see [`2.4.0...2.5.0`][2.4.0...2.5.0].

### Changed

* Configured the `phpdoc_add_missing_param_annotation` fixer to add annotation for untyped parameters only ([#220]), by [@localheinz]

## [`2.4.0`][2.4.0]

Expand Down Expand Up @@ -112,6 +120,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[2.2.2]: https://github.com/ergebnis/php-cs-fixer-config/releases/tag/2.2.2
[2.3.0]: https://github.com/ergebnis/php-cs-fixer-config/releases/tag/2.3.0
[2.4.0]: https://github.com/ergebnis/php-cs-fixer-config/releases/tag/2.4.0
[2.5.0]: https://github.com/ergebnis/php-cs-fixer-config/releases/tag/2.5.0

[d899e77...1.0.0]: https://github.com/ergebnis/php-cs-fixer-config/compare/d899e77...1.0.0
[1.0.0...1.1.0]: https://github.com/ergebnis/php-cs-fixer-config/compare/1.0.0...1.1.0
Expand All @@ -125,7 +134,8 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[2.2.1...2.2.2]: https://github.com/ergebnis/php-cs-fixer-config/compare/2.2.1...2.2.2
[2.2.2...2.3.0]: https://github.com/ergebnis/php-cs-fixer-config/compare/2.2.1...2.3.0
[2.3.0...2.4.0]: https://github.com/ergebnis/php-cs-fixer-config/compare/2.3.0...2.4.0
[2.4.0...main]: https://github.com/ergebnis/php-cs-fixer-config/compare/2.4.0...main
[2.4.0...2.5.0]: https://github.com/ergebnis/php-cs-fixer-config/compare/2.4.0...2.5.0
[2.5.0...main]: https://github.com/ergebnis/php-cs-fixer-config/compare/2.5.0...main

[#3]: https://github.com/ergebnis/php-cs-fixer-config/pull/3
[#14]: https://github.com/ergebnis/php-cs-fixer-config/pull/14
Expand All @@ -138,6 +148,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0].
[#168]: https://github.com/ergebnis/php-cs-fixer-config/pull/168
[#200]: https://github.com/ergebnis/php-cs-fixer-config/pull/200
[#215]: https://github.com/ergebnis/php-cs-fixer-config/pull/215
[#220]: https://github.com/ergebnis/php-cs-fixer-config/pull/220

[@dependabot]: https://github.com/apps/dependabot
[@linuxjuggler]: https://github.com/linuxjuggler
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php71.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ final class Php71 extends AbstractRuleSet
],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
'only_untyped' => true,
],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php73.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ final class Php73 extends AbstractRuleSet
],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
'only_untyped' => true,
],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/RuleSet/Php74.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ final class Php74 extends AbstractRuleSet
],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
'only_untyped' => true,
],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
Expand Down
2 changes: 0 additions & 2 deletions test/Unit/RuleSet/AbstractRuleSetTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ final protected static function className(): string
}

/**
* @param ?string $header
*
* @throws \RuntimeException
*/
final protected static function createRuleSet(?string $header = null): Config\RuleSet
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php71Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ final class Php71Test extends AbstractRuleSetTestCase
],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
'only_untyped' => true,
],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php73Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ final class Php73Test extends AbstractRuleSetTestCase
],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
'only_untyped' => true,
],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/RuleSet/Php74Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ final class Php74Test extends AbstractRuleSetTestCase
],
'php_unit_test_class_requires_covers' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
'only_untyped' => true,
],
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
Expand Down