Skip to content

Conversation

@TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Sep 28, 2025

No description provided.

@TomasVotruba TomasVotruba changed the title tv cover named args Cover named args in ClassMethodArrayDocblockParamFromLocalCallsRector Sep 28, 2025
@TomasVotruba TomasVotruba merged commit 966cfd9 into main Sep 28, 2025
49 of 50 checks passed
@TomasVotruba TomasVotruba deleted the tv-cover-named-args branch September 28, 2025 19:41
foreach ($call->args as $position => $arg) {
if ($this->shouldSkipArg($arg)) {
return [];
continue;
Copy link
Member

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.

Copy link
Member

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);
Copy link
Member

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.

Copy link
Member

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants