class ViewStringFileDependencyRule implements Rule

Declares that a file whose own PHPDoc uses a view-string depends on which views exist.

A name returned under @return view-string, a property default and an inline @var are checked in the declaring file, which may declare no class, so the class declarations ViewStringTypeNodeResolverExtension records do not reach it. A global type alias that resolves to a view-string counts as one.

Methods

__construct(RuntimeInputs $runtimeInputs, TypeStringResolver $typeStringResolver, array $typeAliases)

Create a new view-string file dependency rule.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Declare the dependency of a file whose text names a view-string type.

Details

at line 47
__construct(RuntimeInputs $runtimeInputs, TypeStringResolver $typeStringResolver, array $typeAliases)

Create a new view-string file dependency rule.

Parameters

RuntimeInputs $runtimeInputs
TypeStringResolver $typeStringResolver
array $typeAliases

the global type aliases

at line 58
string getNodeType()

Get the node type the rule checks.

Return Value

string

at line 71
array processNode(Node $node, Scope $scope)

Declare the dependency of a file whose text names a view-string type.

Parameters

Node $node
Scope $scope

Return Value

array