class EnvironmentReadVisitor extends NodeVisitorAbstract

internal  
 

Collect the environment variables the traversed files read for EnvironmentVariableScanner.

It tracks the class and function enclosing each read, because a read whose name is computed is accounted for only inside the readers themselves and the modeled framework methods.

Properties

array<string, true> $names

The constant variable names read.

bool $dynamic

Whether a read's name is computed outside the readers and modeled methods.

Methods

__construct(EnvironmentVariableScanner $scanner)

Create a new visitor instance.

null
enterNode(Node $node)

Record the read a node makes, after entering the class or function it declares.

null
leaveNode(Node $node)

Leave the class or function a node declares.

Details

at line 55
__construct(EnvironmentVariableScanner $scanner)

Create a new visitor instance.

Parameters

EnvironmentVariableScanner $scanner

at line 63
null enterNode(Node $node)

Record the read a node makes, after entering the class or function it declares.

Parameters

Node $node

Return Value

null

at line 96
null leaveNode(Node $node)

Leave the class or function a node declares.

Parameters

Node $node

Return Value

null