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

Uses the configured lexer to distinguish required separators from layout whitespace.

Methods§

public function __construct(private SqlParser $parser, private Settings $settings)

Reuses the caller's grammar release and lexical SQL mode.

Parameters

$parserSqlParser
$settingsSettings
public function between(Token $left, Token $right, ?Token $next, ?Token $before = null): string

Includes lookahead when comparing candidate token boundaries.

Parameters

$leftToken
$rightToken
$next?Token
$before?Token

Returns

string
Test cases 3
Called from 1
Calls 1
public function signature(string $sql): list<array{string, string}>

Parameters

$sqlstring

Returns

list<array{string, string}>

Throws

SourceException When a candidate joins tokens into an invalid lexeme
Test cases 1
Called from 2
Calls 2

Private surface 2§

Implementation details, listed for orientation only.

private SqlParser $parser
private Settings $settings

Test cases 18§

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

Dedicated tests 3
Other tests reaching this symbol 15

Relations§

Instantiated in 1
Method calls 1
Type declarations 1