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

Applies canonical spellings and optional grammar rules to a lossless syntax tree.

Methods§

public function __construct(
    private array<int, Token> $cleaned,
    private array<int, true> $protected,
    private array<int, true> $verbatim,
    private Settings $settings,
)

Parameters

$cleanedarray<int, Token>Tokens with ordinary trivia removed
$protectedarray<int, true>Tokens carrying directives or executable SQL
$verbatimarray<int, true>Tokens inside executable comments
$settingsSettings
public function tokens(
    Node|Token $node,
    bool $identifier = false,
    ?Node $parent = null,
): list<Token>

Private surface 4§

Implementation details, listed for orientation only.

private array<int, Token> $cleaned
private array<int, true> $protected
private array<int, true> $verbatim
private Settings $settings

Test cases 16§

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

Dedicated tests 1
Other tests reaching this symbol 15

Relations§

Instantiated in 1
Method calls 1