final class ModifiedNames
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

The names a statement may assign, wherever inside it the assignment is written.

Walking back over a statement that assigns none of the names still being looked for learns nothing, so this is what decides whether a branch has to be split into its arms at all. The answer is remembered per statement, because the same statement is walked back over once for every path that crosses it.

Methods§

public function __construct(?FreeNames $names = null, private ?ObjectEffects $objects = null)

Builds the reader over the naming the rest of the derivation uses.

Parameters

$names?FreeNames
$objects?ObjectEffects
Calls 2
public function collect(Node $node): array<string, true>

Every name the node may assign, worked out from scratch.

Parameters

$nodeNode

Returns

array<string, true>
Test cases 1
Called from 1
Calls 5
public function targets(Node $target): array<string, true>

The names written by assigning to the given target.

Parameters

$targetNode

Returns

array<string, true>
Test cases 1
Called from 16
Calls 3
public function baseName(Node $target): ?string

The name an assignment target writes into, looking through element writes.

$sql['where'][] = … writes into sql; $this->parts[] = … writes into this->parts. Anything else, such as a variable variable, has no name.

Parameters

$targetNode

Returns

?string
Test cases 1
Called from 3
Calls 3
public function all(array<array-key, Node> $targets): array<string, true>

Private surface 4§

Implementation details, listed for orientation only.

private WeakMap<Node, array<string, true>> $remembered
private FreeNames $names
private ?ReferenceEffects $references = null
private ?ObjectEffects $objects = null

Test cases 65§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 9
Other tests reaching this symbol 56

Relations§

Instantiated in 9
Method calls 25
Type declarations 10