Skip to content

Commit

Permalink
[NodeTypeResolver] Improve ParametersAcceptorSelectorVariantsWrapper …
Browse files Browse the repository at this point in the history
…by directly use ParametersAcceptorSelector::combineAcceptors() (#3706)
  • Loading branch information
samsonasik committed Apr 29, 2023
1 parent 28712b9 commit 0451834
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ public static function select(
): ParametersAcceptor {
$variants = $reflection->getVariants();
if ($node instanceof FunctionLike) {
$parameterAcceptors = [];
foreach ($variants as $variant) {
$parameterAcceptors[] = ParametersAcceptorSelector::selectSingle([$variant]);
}

return ParametersAcceptorSelector::combineAcceptors($parameterAcceptors);
return ParametersAcceptorSelector::combineAcceptors($variants);
}

if ($node->isFirstClassCallable()) {
Expand Down

0 comments on commit 0451834

Please sign in to comment.