Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Apr 24, 2023
1 parent e6c95c1 commit 42bcdaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 62 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ public function __construct(
public function complete(ClassMethod $classMethod, array $classParameterTypes, int $maxUnionTypes): ?ClassMethod
{
$hasChanged = false;
$totalTypes = count($classParameterTypes);

foreach ($classParameterTypes as $position => $argumentStaticType) {
if ($totalTypes > 1 && $argumentStaticType instanceof \PHPStan\Type\UnionType) {
return null;
}

/** @var Type $argumentStaticType */
if ($this->shouldSkipArgumentStaticType($classMethod, $argumentStaticType, $position, $maxUnionTypes)) {
continue;
Expand Down

0 comments on commit 42bcdaa

Please sign in to comment.