Skip to content

Commit

Permalink
using ClassExistenceStaticHelper::doesClassLikeExist($className)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 28, 2021
1 parent 4b117e2 commit 916dad2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Rector\Caching\FileSystem\DependencyResolver;
use Rector\Core\Configuration\Configuration;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\NodeTypeResolver\ClassExistenceStaticHelper;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\NodeTypeResolver\PHPStan\Collector\TraitNodeScopeCollector;
use Rector\NodeTypeResolver\PHPStan\Scope\NodeVisitor\RemoveDeepChainMethodCallNodeVisitor;
Expand Down Expand Up @@ -190,7 +191,7 @@ private function resolveClassOrInterfaceScope(ClassLike $classLike, Scope $scope
if ($classLike instanceof Class_ && Strings::match($className, self::ANONYMOUS_CLASS_START_REGEX)) {
$classReflection = $this->reflectionProvider->getAnonymousClassReflection($classLike, $scope);
} else {
if (class_exists($className, false)) {
if (! ClassExistenceStaticHelper::doesClassLikeExist($className)) {
return null;
}

Expand Down

0 comments on commit 916dad2

Please sign in to comment.