Skip to content

Commit

Permalink
Clean up SafeLeftTypeBooleanAndOrAnalyzer (#5819)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Apr 12, 2024
1 parent ec59456 commit 3df5a62
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ public function isSafe(BooleanAnd|BooleanOr $booleanAnd): bool
// skip trait this
$classReflection = $this->reflectionResolver->resolveClassReflection($booleanAnd);
if ($classReflection instanceof ClassReflection && $classReflection->isTrait()) {
return ! (bool) $this->betterNodeFinder->findFirst(
$booleanAnd->left,
static fn(Node $node): bool => $node instanceof Instanceof_
);
return ! $booleanAnd->left instanceof Instanceof_;
}

return true;
Expand Down

0 comments on commit 3df5a62

Please sign in to comment.