From 6acb52eb692f2cc3c11caad6865373592eb9b07c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 17 Nov 2024 02:47:07 +0000 Subject: [PATCH] [ci-review] Rector Rectify --- .../PHPStan/Scope/PHPStanNodeScopeResolver.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php b/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php index 0eb37b7a378..daeec3d61c9 100644 --- a/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php +++ b/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php @@ -4,6 +4,7 @@ namespace Rector\NodeTypeResolver\PHPStan\Scope; +use PHPStan\Parser\ParserErrorsException; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; @@ -54,8 +55,6 @@ use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\UnionType; use PhpParser\NodeTraverser; -use PhpParser\ParserFactory; -use PhpParser\PhpVersion; use PHPStan\Analyser\MutatingScope; use PHPStan\Analyser\NodeScopeResolver; use PHPStan\Analyser\ScopeContext; @@ -65,8 +64,6 @@ use PHPStan\ShouldNotHappenException; use PHPStan\Type\ObjectType; use PHPStan\Type\TypeCombinator; -use Rector\Config\RectorConfig; -use Rector\DependencyInjection\LazyContainerFactory; use Rector\NodeAnalyzer\ClassAnalyzer; use Rector\NodeNameResolver\NodeNameResolver; use Rector\NodeTypeResolver\Node\AttributeKey; @@ -333,7 +330,7 @@ private function nodeScopeResolverProcessNodes( ): void { try { $this->nodeScopeResolver->processNodes($stmts, $mutatingScope, $nodeCallback); - } catch (\PHPStan\Parser\ParserErrorsException) { + } catch (ParserErrorsException) { // nothing we can do as error parsing from deep internal PHPStan service with service injection we cannot reset // in the middle of process } catch (ShouldNotHappenException) {