We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5aee3dc commit eb3cc15Copy full SHA for eb3cc15
src/Mockery/Type/MockDynamicReturnTypeExtension.php
@@ -5,7 +5,6 @@
5
use PhpParser\Node\Expr\StaticCall;
6
use PHPStan\Analyser\Scope;
7
use PHPStan\Reflection\MethodReflection;
8
-use PHPStan\Reflection\ParametersAcceptorSelector;
9
use PHPStan\Type\Constant\ConstantStringType;
10
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
11
use PHPStan\Type\ObjectType;
@@ -34,9 +33,7 @@ public function getTypeFromStaticMethodCall(
34
33
Scope $scope
35
): Type
36
{
37
- $defaultReturnType = ParametersAcceptorSelector::selectSingle(
38
- $methodReflection->getVariants()
39
- )->getReturnType();
+ $defaultReturnType = new ObjectType('Mockery\\MockInterface');
40
if (count($methodCall->args) === 0) {
41
return $defaultReturnType;
42
}
0 commit comments