Skip to content

Remove superfluous phpdoc tags #33151

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

Merged
merged 1 commit into from
Aug 14, 2019
Merged

Remove superfluous phpdoc tags #33151

merged 1 commit into from
Aug 14, 2019

Conversation

tigitz
Copy link
Contributor

@tigitz tigitz commented Aug 13, 2019

Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ...
License MIT

As Symfony is moving towards type hinted code, this PR is attempting to remove the now superfluous annotations

See #33150 to make this cleaning as an automatic process

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mixed" would not be considered superfluous to me (to answer your question on the issue)

@@ -188,7 +188,6 @@ public function setAutocompleterCallback(callable $callback = null): self
/**
* Sets a validator for the question.
*
* @param callable|null $validator
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can extra blank lines be removed by the tool too?

Copy link
Contributor Author

@tigitz tigitz Aug 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm shouldn't fabbot.io catch those ?

I ran php-cs-fixer with 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], as the only rule to speed up things, so others rules from .php_cs.dist might handle these.

What's clear is that the no_superfluous_phpdoc_tags doesn't handle it itself after it's cleaning

I'll check my guess and see if there's even another rule we can add that can do this check if not in .php_cs.dist file already

* @param RawMessage $message
*
* {@inheritdoc}
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why superfuous here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was a typo as the annotated param here is $message, probably copy pasted from the function above, while the real param is $email here but with no indications on it's type it seems. So I decided to simply remove it.

I'll keep the inheritdoc though.

* @param \ReflectionClass $reflectionClass
* @param array|bool $allowedAttributes
* @param string|null $format
* @param string $class
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolas-grekas
Copy link
Member

/cc @derrabus some things to borrow to close #32179 here :)

@tigitz
Copy link
Contributor Author

tigitz commented Aug 13, 2019

Cleaning of some files went a little bit too far and broke some php doc extraction tests 😅, will fix this

@nicolas-grekas nicolas-grekas modified the milestones: next, 5.0 Aug 14, 2019
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for the workflow part

@nicolas-grekas nicolas-grekas changed the base branch from master to 3.4 August 14, 2019 12:00
@nicolas-grekas
Copy link
Member

Thank you @tigitz
I've also added the phpdoc_trim_consecutive_blank_line_separation rule and opened PHP-CS-Fixer/PHP-CS-Fixer#4504

@nicolas-grekas nicolas-grekas merged commit 608e23c into symfony:3.4 Aug 14, 2019
nicolas-grekas added a commit that referenced this pull request Aug 14, 2019
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #33151).

Discussion
----------

Remove superfluous phpdoc tags

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ...
| License       | MIT

As Symfony is moving towards type hinted code, this PR is attempting to remove the now superfluous annotations

See #33150 to make this cleaning as an automatic process

Commits
-------

608e23c Remove superfluous phpdoc tags
@nicolas-grekas
Copy link
Member

This is now merged up to master 🎉

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