Skip to content

Commit

Permalink
Fix compatibility with newer version of Mockery
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Aug 15, 2019
1 parent 5aee3dc commit eb3cc15
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Mockery/Type/MockDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
use PHPStan\Type\ObjectType;
Expand Down Expand Up @@ -34,9 +33,7 @@ public function getTypeFromStaticMethodCall(
Scope $scope
): Type
{
$defaultReturnType = ParametersAcceptorSelector::selectSingle(
$methodReflection->getVariants()
)->getReturnType();
$defaultReturnType = new ObjectType('Mockery\\MockInterface');
if (count($methodCall->args) === 0) {
return $defaultReturnType;
}
Expand Down

0 comments on commit eb3cc15

Please sign in to comment.