Skip to content

Commit eb3cc15

Browse files
committed
Fix compatibility with newer version of Mockery
1 parent 5aee3dc commit eb3cc15

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Mockery/Type/MockDynamicReturnTypeExtension.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use PhpParser\Node\Expr\StaticCall;
66
use PHPStan\Analyser\Scope;
77
use PHPStan\Reflection\MethodReflection;
8-
use PHPStan\Reflection\ParametersAcceptorSelector;
98
use PHPStan\Type\Constant\ConstantStringType;
109
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
1110
use PHPStan\Type\ObjectType;
@@ -34,9 +33,7 @@ public function getTypeFromStaticMethodCall(
3433
Scope $scope
3534
): Type
3635
{
37-
$defaultReturnType = ParametersAcceptorSelector::selectSingle(
38-
$methodReflection->getVariants()
39-
)->getReturnType();
36+
$defaultReturnType = new ObjectType('Mockery\\MockInterface');
4037
if (count($methodCall->args) === 0) {
4138
return $defaultReturnType;
4239
}

0 commit comments

Comments
 (0)