Skip to content

Commit

Permalink
correct reflector type
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 11, 2022
1 parent 6ec99d2 commit 6c0dd53
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\ScopeContext;
use PHPStan\BetterReflection\Reflector\Reflector;
use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator;
use PHPStan\BetterReflection\SourceLocator\Type\SourceLocator;
use PHPStan\Node\UnreachableStatementNode;
Expand All @@ -27,7 +28,6 @@
use Rector\Core\Util\StringUtils;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\NodeTypeResolver\PHPStan\Scope\NodeVisitor\RemoveDeepChainMethodCallNodeVisitor;
use Reflector;
use Symplify\PackageBuilder\Reflection\PrivatesAccessor;
use Symplify\SmartFileSystem\SmartFileInfo;

Expand Down Expand Up @@ -218,10 +218,14 @@ private function decoratePHPStanNodeScopeResolverWithRenamedClassSourceLocator(
$classReflector = $this->privatesAccessor->getPrivatePropertyOfClass(
$nodeScopeResolver,
'reflector',
MemoizingReflector::class
Reflector::class
);

$reflector = $this->privatesAccessor->getPrivatePropertyOfClass($classReflector, 'reflector', MemoizingReflector::class);
$reflector = $this->privatesAccessor->getPrivatePropertyOfClass(
$classReflector,
'reflector',
Reflector::class
);

/** @var SourceLocator $sourceLocator */
$sourceLocator = $this->privatesAccessor->getPrivatePropertyOfClass(
Expand Down

0 comments on commit 6c0dd53

Please sign in to comment.