-
-
Notifications
You must be signed in to change notification settings - Fork 431
Cover named args in ClassMethodArrayDocblockParamFromLocalCallsRector #7357
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
Conversation
| foreach ($call->args as $position => $arg) { | ||
| if ($this->shouldSkipArg($arg)) { | ||
| return []; | ||
| continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return [] was right, when there is a first class callable or unpack in list of calls, should be immediatelly stop all together since we don't know what the arg passed allowed.
I will create new PR for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $positionOrName = $position; | ||
| } | ||
|
|
||
| $staticTypesByArgumentPosition[$positionOrName][] = $this->resolveArgValueType($arg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is ArgsAnalyzer->resolveArgPosition()
| public function resolveArgPosition(array $args, string $name, int $defaultPosition): int |
I will create a PR for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, seems ok on this case 👍
No description provided.