Skip to content

Commit

Permalink
[DeadCode] Clean up instanceof check on RemoveDeadInstanceOfRector.php (
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Jul 1, 2024
1 parent 3c2100b commit 1561c90
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions rules/DeadCode/Rector/If_/RemoveDeadInstanceOfRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\If_;
Expand Down Expand Up @@ -158,10 +157,6 @@ private function isInstanceofTheSameType(Instanceof_ $instanceof): ?bool
return null;
}

if (! $instanceof->class instanceof FullyQualified) {
return null;
}

$exprType = $this->nodeTypeResolver->getNativeType($instanceof->expr);
if (! $exprType instanceof ObjectType) {
return null;
Expand Down

0 comments on commit 1561c90

Please sign in to comment.