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

Fix and improve overall PHPDocs#54489

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

Closed

Conversation

@alexandre-daubois
Copy link
Member

QA
Branch?5.4
Bug fix?no
New feature?no
Deprecations?no
Issues#54487 (comment)
LicenseMIT

This also remove a few useless ones already inferred in the code and flipped non-canonical@var occurrences.

Copy link
Member

@GromNaNGromNaN left a comment

Choose a reason for hiding this comment

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

I think the type of thecallable params should not be updated. Or possibly in the next minor 7.1.

@xabbuh
Copy link
Member

This should target 7.1 as it's not a bugfix.

wouterj reacted with thumbs up emoji

@alexandre-daubois
Copy link
MemberAuthor

alexandre-daubois commentedApr 4, 2024
edited
Loading

I agree but as it doesn't change any behavior in the code. Wouldn't it be easier for future upmerges and conflicts resolving to push this to 5.4?

Also, some phpdocs are wrong, so I guess it can be considered as a bug fix? I'm not sure

This also remove a few useless ones already inferred in the code
Comment on lines 55 to +56
* @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

Choose a reason for hiding this comment

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

This is intended.

I think we should rather remove all types everywhere if they duplicate the type defined in PHP (which is almost always the case, except for generic types). See#53363 (comment)

But if we do this, we should automate this using Rector or PHP CS Fixer.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is an interesting point of view. Are we 100% we want to do this? Rector could definitely do the trick with this

Choose a reason for hiding this comment

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

Yes we are :)

alexandre-daubois reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Alright, I might close this PR in favor of one that removes redundant types as explained by Wouter. Should such PR target 5.4 or 7.1?

* @param string$message Exception message to throw
* @param array$alternatives List of similar defined names
* @param int$code Exception code
* @param?\Throwable $previous Previous exception used for the exception chaining

Choose a reason for hiding this comment

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

for consistency with other similar changes:

Suggested change
* @param?\Throwable$previous Previous exception usedfor the exception chaining
* @param \Throwable|null$previous Previous exception usedfor the exception chaining

*
* @param mixed $format
* @param string $locale
* @param mixed $format

Choose a reason for hiding this comment

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

Suggested change
* @param mixed$format
* @param mixed$format

@alexandre-daubois
Copy link
MemberAuthor

Closing in favor of#54523

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

@GromNaNGromNaNGromNaN left review comments

@wouterjwouterjwouterj left review comments

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

@ycerutoycerutoAwaiting requested review from ycerutoyceruto is a code owner

@jderussejderusseAwaiting requested review from jderussejderusse is a code owner

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

+1 more reviewer

@ro0NLro0NLro0NL left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

7 participants

@alexandre-daubois@xabbuh@nicolas-grekas@GromNaN@wouterj@ro0NL@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp