From 5bb4940df348cfb7a5cb34863016510759b2cab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sat, 29 Feb 2020 19:59:52 +0100 Subject: [PATCH] Fix: Import parent namespace only --- src/PhpDoc/TypeNodeResolverExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpDoc/TypeNodeResolverExtension.php b/src/PhpDoc/TypeNodeResolverExtension.php index b0127d8..78b8156 100644 --- a/src/PhpDoc/TypeNodeResolverExtension.php +++ b/src/PhpDoc/TypeNodeResolverExtension.php @@ -18,7 +18,7 @@ use PHPStan\PhpDoc; use PHPStan\PhpDocParser; use PHPStan\Type; -use Prophecy\Prophecy\ObjectProphecy; +use Prophecy\Prophecy; final class TypeNodeResolverExtension implements PhpDoc\TypeNodeResolverAwareExtension, PhpDoc\TypeNodeResolverExtension { @@ -51,7 +51,7 @@ public function resolve(PhpDocParser\Ast\Type\TypeNode $typeNode, Analyser\NameS $type = $this->typeNodeResolver->resolve($innerType, $nameScope); if ($type instanceof Type\TypeWithClassName) { - if (ObjectProphecy::class === $type->getClassName()) { + if (Prophecy\ObjectProphecy::class === $type->getClassName()) { $objectProphecyType = $type; } else { $prophesizedType = $type;