Skip to content

Commit b0bf973

Browse files
committed
[ci-review] Rector Rectify
1 parent 12b2759 commit b0bf973

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,17 @@
77
use Nette\Utils\Strings;
88
use PhpParser\Node;
99
use PhpParser\Node\Expr\Assign;
10-
use PhpParser\Node\Expr\Closure;
1110
use PhpParser\Node\Expr\Variable;
1211
use PhpParser\Node\Name;
1312
use PhpParser\Node\Stmt;
1413
use PhpParser\Node\Stmt\Catch_;
15-
use PhpParser\Node\Stmt\ClassMethod;
16-
use PhpParser\Node\Stmt\Function_;
17-
use PhpParser\Node\Stmt\Namespace_;
1814
use PhpParser\Node\Stmt\TryCatch;
1915
use PhpParser\NodeVisitor;
2016
use PHPStan\Analyser\Scope;
2117
use PHPStan\Type\ObjectType;
2218
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
2319
use Rector\Naming\Naming\PropertyNaming;
2420
use Rector\NodeTypeResolver\Node\AttributeKey;
25-
use Rector\PhpParser\Node\CustomNode\FileWithoutNamespace;
2621
use Rector\Rector\AbstractRector;
2722
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
2823
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@@ -242,7 +237,7 @@ private function replaceNextUsageVariable(
242237
$nextCatchVariableName = $this->getName($node->var);
243238

244239
dump($nextCatchVariableName);
245-
if (in_array($nextCatchVariableName, [$oldVariableName])) {
240+
if ($nextCatchVariableName == $oldVariableName) {
246241
return NodeVisitor::STOP_TRAVERSAL;
247242
}
248243
}

0 commit comments

Comments
 (0)