Skip to content

Commit

Permalink
Clean up UseImportsTraverser
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Sep 5, 2024
1 parent e2b96d4 commit 4ec22d5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions rules/CodingStyle/ClassNameImport/UseImportsTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ public function traverserStmts(array $stmts, callable $callable): void
continue;
}

if (! $stmt instanceof Use_ && ! $stmt instanceof GroupUse) {
continue;
}

if ($stmt instanceof Use_) {
foreach ($stmt->uses as $useUse) {
$name = $this->nodeNameResolver->getName($useUse);
Expand All @@ -48,7 +44,9 @@ public function traverserStmts(array $stmts, callable $callable): void
continue;
}

$this->processGroupUse($stmt, $callable);
if ($stmt instanceof GroupUse) {
$this->processGroupUse($stmt, $callable);
}
}
}

Expand Down

0 comments on commit 4ec22d5

Please sign in to comment.