Skip to content

Commit 3dd7dd7

Browse files
committed
Fixed TypeGuesser to also filter out Prophecy's DoubleInterface
1 parent ec944fb commit 3dd7dd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Memio/SpecGen/Marshaller/Service/TypeGuesser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Memio\SpecGen\Marshaller\Service;
1313

14+
use Prophecy\Doubler\DoubleInterface;
1415
use Prophecy\Doubler\Generator\ReflectionInterface;
1516
use Prophecy\Prophecy\ProphecySubjectInterface;
1617

@@ -25,6 +26,7 @@ public function guess($variable): string
2526
return $this->getNonObjectType($variable);
2627
}
2728
$interfaces = class_implements($variable);
29+
unset($interfaces[DoubleInterface::class]);
2830
unset($interfaces[ProphecySubjectInterface::class]);
2931
unset($interfaces[ReflectionInterface::class]);
3032
$interface = current($interfaces);

0 commit comments

Comments
 (0)