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

One path being walked back from a call: what it passed through, and what it still needs.

The steps are held nearest-first, in the order the walk finds them, and turned around only when the path is run. What is still needed is the set of names no step on the path has defined yet; when it is empty, nothing earlier in the program can change the argument and the walk along this path is done.

Properties§

public list<SliceStep> $steps
public array<string, true> $needs
public bool $truncated = false
public bool $exhausted = false

Methods§

public function __construct(
    public list<SliceStep> $steps,
    public array<string, true> $needs,
    public bool $truncated = false,
    public bool $exhausted = false,
)

Parameters

$stepslist<SliceStep>The steps found so far, nearest to the call first
$needsarray<string, true>The names nothing on the path has defined yet
$truncatedboolWhether a bound cut the path short of every way it could have gone
$exhaustedboolWhether the budget ran out before the path was walked to its start
public static function needing(array<string, true> $needs): self

A path that has gone nowhere yet, needing the given names.

Parameters

$needsarray<string, true>

Returns

self
Test cases 47
Called from 6
Calls 1
public function through(SliceStep $step, array<string, true> $needs): self

The path, one step further back.

Parameters

$stepSliceStep
$needsarray<string, true>What the path needs once the step is taken

Returns

self
Called from 2
Calls 2
public function then(self $further): self

The path, followed further back by another path that started where this one stands.

Parameters

$furtherself

Returns

self
Called from 1
Calls 2
public function forward(): list<SliceStep>

The steps in the order they run.

Returns

list<SliceStep>
Test cases 1
Calls 1
  • function-call array_reverse line 97
public function signature(): string

What tells this path apart from another that reached the same place.

Returns

string
Test cases 1
Calls 5
public static function gather(non-empty-list<self> $paths): self

Several paths gathered into one, when there are more than it pays to keep apart.

The paths are kept as alternatives of a single step rather than joined value by value, so running it still runs each of them; what is given up is only keeping them apart from the paths that come before them.

Parameters

$pathsnon-empty-list<self>

Returns

self
Test cases 1
Called from 2
Calls 2

Test cases 71§

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 62

Relations§

Instantiated in 1
Static calls 8
Method calls 8
Type declarations 15