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

[TypeDeclaration] skip variadic constructor param of mixed type on AddParamTypeFromPropertyTypeRector #4887

Conversation

Celebrate-Reinhard
Copy link
Contributor

@Celebrate-Reinhard Celebrate-Reinhard commented Aug 31, 2023

This reverts commit 353a75f.

Taking over type of doc block would be nice. As discussed in PR:
we can't rely on docblock, so skipping is the safest.
Comment on lines +96 to 99
if ($param->variadic) {
continue;
}
if (! $this->paramTypeAddGuard->isLegal($param, $node)) {
Copy link
Member

Choose a reason for hiding this comment

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

Looks good 👍 , we can move the variadic check to $this->paramTypeAddGuard->isLegal() method if we have another use case in other rule

@samsonasik samsonasik changed the title skip variadic constructor param of mixed type [TypeDeclaration] skip variadic constructor param of mixed type on AddParamTypeFromPropertyTypeRector Aug 31, 2023
@samsonasik samsonasik merged commit 4b0a688 into rectorphp:main Aug 31, 2023
38 checks passed
@samsonasik
Copy link
Member

Thank you @Celebrate-Reinhard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants