Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Console] CS fix#53363

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:5.4fromOskarStark:fix/doc
Jan 4, 2024
Merged

[Console] CS fix#53363

nicolas-grekas merged 1 commit intosymfony:5.4fromOskarStark:fix/doc
Jan 4, 2024

Conversation

@OskarStark
Copy link
Contributor

QA
Branch?5.4
Bug fix?yes
New feature?no
Deprecations?no
Issues--
LicenseMIT

*
* @param string[] $tokens the set of split tokens (e.g. COMP_WORDS or argv)
* @param $currentIndex the index of the cursor (e.g. COMP_CWORD)
* @paramint $currentIndex the index of the cursor (e.g. COMP_CWORD)
Copy link
Member

@wouterjwouterjJan 2, 2024
edited
Loading

Choose a reason for hiding this comment

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

This is intentional. The type is optional and already given in de PHP code. We've done this in multiple locations (and I would even be in favor of removing all duplicate types from the PHPdoc)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

PHPStorm was complaining about it:
CleanShot 2024-01-03 at 14 43 40@2x

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I think we should be content, in 5.4 only two more needs to be fixed, which I've done in this PR.
I also created a PR for 6.3

If both are accepted and (up)merged, I will check 6.4, 7.0 and 7.1

Copy link
Member

Choose a reason for hiding this comment

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

To me, that's a bug in PHPstorm.

Copy link
Member

Choose a reason for hiding this comment

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

@wouterj Do you have a link to a discussion about this?
I consider such doc param to be incomplete and less readable: when reading a param's description, not having the type right before it requires to find and look at the corresponding parameter inside the signature to get the full picture

keradus and OskarStark reacted with thumbs up emoji
Copy link
Member

@wouterjwouterjJan 3, 2024
edited
Loading

Choose a reason for hiding this comment

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

Sure, it has always been part of our coding standard:

  • Add PHPDoc blocks for classes, methods, and functions only when they add relevant information that does not duplicate the name, native type declaration or context (e.g. instanceof checks);

Discussed in the PR making the change:#41912 (review)

See also#46140#46218#46217#44935#45324 (a couple of these are rejected by you actually Robin 😉)

chalasr reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Fair enough :)

@OskarStarkOskarStark changed the title[Console] Add missing PHPDoc type[Console][Cache] Add missing PHPDoc typeJan 3, 2024
@carsonbotcarsonbot changed the title[Console][Cache] Add missing PHPDoc type[Cache][Console] Add missing PHPDoc typeJan 3, 2024
@OskarStarkOskarStark mentioned this pull requestJan 3, 2024

/**
* {@inheritdoc}
*/
Copy link
ContributorAuthor

@OskarStarkOskarStarkJan 3, 2024
edited
Loading

Choose a reason for hiding this comment

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

Those "inheritdoc" got removed by applying the fabbot patch, shall I revert?

Copy link
Member

Choose a reason for hiding this comment

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

any value to keep it? i would suggest to remove all.
and if anything, I would suggest to switch to#[Override] (probably as alignment for whole project, not this single place only)

/**
* Finish the indicator with message.
*
* @param $message
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Useless

Choose a reason for hiding this comment

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

I think that's the only change we might wanna keep. See@wouterj's comment.
Also 5.4 is for bug fixes only, and this is not one.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

@nicolas-grekasnicolas-grekas changed the title[Cache][Console] Add missing PHPDoc type[Console] CS fixJan 4, 2024
@nicolas-grekas
Copy link
Member

Thank you@OskarStark.

@nicolas-grekasnicolas-grekas merged commit14c9476 intosymfony:5.4Jan 4, 2024
@OskarStarkOskarStark deleted the fix/doc branchJanuary 4, 2024 08:14
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@wouterjwouterjwouterj requested changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

+1 more reviewer

@keraduskeraduskeradus approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

6 participants

@OskarStark@nicolas-grekas@wouterj@keradus@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp