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

Formats and verifies SQL using injected parsing and formatting contracts.

Methods§

public function __construct(
    private SqlParser $parser,
    private Dialect $dialect,
    private FormatOptions $options = new \SqlFormatter\Core\FormatOptions(),
)

Reuses a configured parser and an immutable layout preset across calls.

Parameters

$parserSqlParser
$dialectDialect
$optionsFormatOptions
Calls 1

Private surface 3§

Implementation details, listed for orientation only.

private SqlParser $parser
private Dialect $dialect
private FormatOptions $options = new \SqlFormatter\Core\FormatOptions()

Test cases 37§

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

Dedicated tests 2
Other tests reaching this symbol 35

Relations§

Instantiated in 4
Method calls 1
Type declarations 4