Skip to content

Fix docblock types of Command::addOption() #46218

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

Closed
wants to merge 1 commit into from

Conversation

mostafa-re
Copy link

Q A
Branch? 6.0
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #46140
License MIT
Doc PR -

@wouterj
Copy link
Member

wouterj commented Apr 29, 2022

Hi there!

The omitted type is intended, to avoid the duplication between the type in the argument list and the PHPdoc (this can only get out-of-sync). According to the specification of phpDocumentor (and the related "draft" PSR), the type can be omitted in @param:

With the @param tag it is possible to document the Type and the intent of a single argument of a function or method. When provided it MAY contain a Type to indicate what is expected.

This is actually an open bug in phpstorm.

@chalasr
Copy link
Member

chalasr commented Apr 30, 2022

Although the codebase is not consistent on this point (that's another topic), I'm 👎 for the reason given by Wouter: this is a PHPStorm bug, not a Symfony one. Thanks for proposing, hope to see you in another contrib

@chalasr chalasr closed this Apr 30, 2022
@chalasr chalasr removed their request for review April 30, 2022 15:38
@wouterj wouterj mentioned this pull request Jan 3, 2024
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.

4 participants