Skip to content

Commit 0a004e8

Browse files
committed
ConstantArrayType: fix returned ConstantArrayTypeAndMethod
1 parent 46b9819 commit 0a004e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Type/Constant/ConstantArrayType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope)
483483
}
484484

485485
$method = $typeAndMethodName->getType()
486+
->getObjectTypeOrClassStringObjectType()
486487
->getMethod($typeAndMethodName->getMethod(), $scope);
487488

488489
if (!$scope->canCallMethod($method)) {
@@ -567,7 +568,7 @@ public function findTypeAndMethodNames(): array
567568
$has = $has->and(TrinaryLogic::createMaybe());
568569
}
569570

570-
$typeAndMethods[] = ConstantArrayTypeAndMethod::createConcrete($type, $method->getValue(), $has);
571+
$typeAndMethods[] = ConstantArrayTypeAndMethod::createConcrete($classOrObject, $method->getValue(), $has);
571572
}
572573

573574
return $typeAndMethods;

0 commit comments

Comments
 (0)