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

Walks a path back over what one statement assigns.

An assignment to a name the path needs becomes a step, and the names its right-hand side reads are needed instead. An assignment that replaces its target settles the name; one that only adds to it, like .= or $a[] =, keeps the name needed so the walk goes on to find what it added to.

Methods§

public function __construct(FreeNames $names, ModifiedNames $modified)

Wires the walk to what tells it which names an assignment reads and writes.

Parameters

$namesFreeNames
$modifiedModifiedNames
public function replaces(Expr $assignment): bool

Whether an assignment replaces what its target held rather than adding to it.

Parameters

$assignmentExpr

Returns

bool
Test cases 1
Called from 1
public function declaration(Global_|Static_|Unset_ $statement, Pending $path): Pending

One path walked back over a global, static or unset that defines names it needs.

Parameters

$statementGlobal_|Static_|Unset_
$pathPending

Returns

Test cases 1
Called from 1
Calls 4

Private surface 2§

Implementation details, listed for orientation only.

private FreeNames $names
private ModifiedNames $modified

Test cases 33§

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

Dedicated tests 5
Other tests reaching this symbol 28

Relations§

Instantiated in 2
Method calls 5
Type declarations 2