Skip to content

Commit 769dbe4

Browse files
committed
Fixed compatibility with 0.11
1 parent e9d7f18 commit 769dbe4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Mockery/Type/StubDynamicReturnTypeExtension.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use PHPStan\Type\IntersectionType;
1111
use PHPStan\Type\ObjectType;
1212
use PHPStan\Type\Type;
13-
use PHPStan\Type\TypeCombinator;
1413
use PHPStan\Type\TypeWithClassName;
1514

1615
class StubDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
@@ -50,10 +49,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
5049
return $defaultType;
5150
}
5251

53-
return TypeCombinator::intersect(
54-
new StubObjectType($mockedType->getClassName()),
55-
new ObjectType($this->stubInterfaceName)
56-
);
52+
return new ObjectType($this->stubInterfaceName);
5753
}
5854

5955
}

0 commit comments

Comments
 (0)