|
7 | 7 | use Nette\Utils\Strings; |
8 | 8 | use PhpParser\Node; |
9 | 9 | use PhpParser\Node\Expr\Assign; |
10 | | -use PhpParser\Node\Expr\Closure; |
11 | 10 | use PhpParser\Node\Expr\Variable; |
12 | 11 | use PhpParser\Node\Name; |
13 | 12 | use PhpParser\Node\Stmt; |
14 | 13 | use PhpParser\Node\Stmt\Catch_; |
15 | | -use PhpParser\Node\Stmt\ClassMethod; |
16 | | -use PhpParser\Node\Stmt\Function_; |
17 | | -use PhpParser\Node\Stmt\Namespace_; |
18 | 14 | use PhpParser\Node\Stmt\TryCatch; |
19 | 15 | use PhpParser\NodeVisitor; |
20 | 16 | use PHPStan\Analyser\Scope; |
21 | 17 | use PHPStan\Type\ObjectType; |
22 | 18 | use Rector\Contract\PhpParser\Node\StmtsAwareInterface; |
23 | 19 | use Rector\Naming\Naming\PropertyNaming; |
24 | 20 | use Rector\NodeTypeResolver\Node\AttributeKey; |
25 | | -use Rector\PhpParser\Node\CustomNode\FileWithoutNamespace; |
26 | 21 | use Rector\Rector\AbstractRector; |
27 | 22 | use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; |
28 | 23 | use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; |
@@ -242,7 +237,7 @@ private function replaceNextUsageVariable( |
242 | 237 | $nextCatchVariableName = $this->getName($node->var); |
243 | 238 |
|
244 | 239 | dump($nextCatchVariableName); |
245 | | - if (in_array($nextCatchVariableName, [$oldVariableName])) { |
| 240 | + if ($nextCatchVariableName == $oldVariableName) { |
246 | 241 | return NodeVisitor::STOP_TRAVERSAL; |
247 | 242 | } |
248 | 243 | } |
|
0 commit comments