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

Renders a node back to source, short enough to quote inside a finding.

Constants§

public const MAX_LENGTH = 60

How many characters of rendered source a quoted expression keeps.

Methods§

public function __construct()

Builds a renderer over the standard pretty printer.

Calls 1
public function render(Node $node): string

The node rendered on one line, truncated with an ellipsis when long.

Parameters

$nodeNode

Returns

string
Test cases 4
Called from 17
Calls 9
public function asExpr(Node $node): Expr

The node as an expression, falling back to a placeholder for anything else.

Parameters

$nodeNode

Returns

Expr
Test cases 1
Called from 1
Calls 1

Private surface 1§

Implementation details, listed for orientation only.

private Standard $printer

Test cases 101§

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 97

Relations§

Instantiated in 2
Method calls 17
Type declarations 11