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

feat(cs-config): add no_superfluous_phpdoc_tags rule without allow_unused_params #23

Merged
merged 1 commit into from
May 25, 2023

Conversation

yannchabed
Copy link
Contributor

Why?

The current @Symfony used rule set enables this rule:

'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'allow_unused_params' => true]

We propose not to allow unused params (dead code dock blocks removed).

Explanation:

Current behavior:

--- Original
+++ New
 <?php
 class Foo {
     /**
-     * @param Bar $bar
-     * @param mixed $baz
      * @param string|int|null $qux
      */
     public function doFoo(Bar $bar, $baz /*, $qux = null */) {}
 }

Future:

--- Original
+++ New
 <?php
 class Foo {
     /**
-     * @param Bar $bar
-     * @param mixed $baz
-     * @param string|int|null $qux
      */
     public function doFoo(Bar $bar, $baz /*, $qux = null */) {}
 }

TODO

  • code is tested
  • documentation is updated (if needed)

@yannchabed yannchabed self-assigned this May 3, 2023
@yannchabed yannchabed requested a review from a team as a code owner May 3, 2023 08:44
@yannchabed yannchabed merged commit 232c71b into master May 25, 2023
@yannchabed yannchabed deleted the feat/add-no-superfluous-phpdoc-tags-rule branch May 25, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants