diff --git a/rules/CodingStyle/ClassNameImport/UseImportsTraverser.php b/rules/CodingStyle/ClassNameImport/UseImportsTraverser.php index 706a8954f6..65721f24aa 100644 --- a/rules/CodingStyle/ClassNameImport/UseImportsTraverser.php +++ b/rules/CodingStyle/ClassNameImport/UseImportsTraverser.php @@ -28,7 +28,7 @@ public function traverserStmts(array $stmts, callable $callable): void foreach ($stmts as $stmt) { if ($stmt instanceof Namespace_ || $stmt instanceof FileWithoutNamespace) { $this->traverserStmts($stmt->stmts, $callable); - return; + continue; } if (! $stmt instanceof Use_ && ! $stmt instanceof GroupUse) {