Skip to content

Commit

Permalink
fix: Add consideration of Node\Attribute to FileVisitor
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Lohmann committed Jan 23, 2025
1 parent c82446b commit a4efe99
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Analyzer/FileVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ public function enterNode(Node $node): void
->addDependency(new ClassDependency($returnType->toString(), $returnType->getLine()));
}
}

if ($node instanceof Node\Attribute) {
$nodeName = $node->name;

if ($nodeName instanceof Node\Name\FullyQualified) {
$this->classDescriptionBuilder
->addDependency(new ClassDependency(implode('\\', $nodeName->getParts()), $node->getLine()));
}
}
}

public function getClassDescriptions(): array
Expand Down

0 comments on commit a4efe99

Please sign in to comment.