Class Yiisoft\YiiDevTool\Infrastructure\CodeUsage\NamespaceUsageFinderNameResolver
| Inheritance | Yiisoft\YiiDevTool\Infrastructure\CodeUsage\NamespaceUsageFinderNameResolver » PhpParser\NodeVisitor\NameResolver |
|---|
Protected Properties
Public Methods
Property Details
Method Details
| public mixed __construct ( Yiisoft\YiiDevTool\Infrastructure\CodeUsage\NamespaceUsageFinder $namespaceUsageFinder, string $environment, \PhpParser\ErrorHandler|null $errorHandler = null, array $options = [] ) | ||
| $namespaceUsageFinder | Yiisoft\YiiDevTool\Infrastructure\CodeUsage\NamespaceUsageFinder | |
| $environment | string | |
| $errorHandler | \PhpParser\ErrorHandler|null | |
| $options | array | |
public function __construct(
protected NamespaceUsageFinder $namespaceUsageFinder,
protected string $environment,
?ErrorHandler $errorHandler = null,
array $options = []
) {
parent::__construct($errorHandler, $options);
}
| public void leaveNode ( \PhpParser\Node $node ) | ||
| $node | \PhpParser\Node | |
public function leaveNode(Node $node): void
{
if ($node instanceof Node\Name\FullyQualified) {
$fullyQualifiedNamespace = $node->toCodeString();
$this->namespaceUsageFinder->registerNamespaceUsage($fullyQualifiedNamespace, $this->environment);
}
}
Signup or Login in order to comment.