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

One piece of a catalogued statement: a run of text that is known, or a gap.

A statement the analyzer could not pin down is not a string with a marker in it. It is a shape, and the gaps in that shape are claims about the analysis: this much is the statement, and this much is a value that would be spliced into it. Reporting the two apart is what lets a reader see which is which instead of reading {$} as something the program writes.

Properties§

public string $text
public bool $isGap = false
public string $origin = ''
public string $reason = ''
public string|null $expression = null
public string|null $variable = null

Methods§

public function __construct(
    public string $text,
    public bool $isGap = false,
    public string $origin = '',
    public string $reason = '',
    public string|null $expression = null,
    public string|null $variable = null,
)

Parameters

$textstringThe characters of a known run, empty for a gap
$isGapboolWhether this is a gap rather than a run of known text
$originstringWhere the value filling a gap comes from, empty for a known run
$reasonstringWhat fills the gap, written for a reader, empty for a known run
$expressionstring|nullThe source expression of a gap, when it is short enough to quote
$variablestring|nullThe PHP variable read at the use site, when known

Test cases 36§

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

Dedicated tests 4
Other tests reaching this symbol 32

Relations§

Instantiated in 4
Static calls 1
Type declarations 6