final class FormatOptions
Public API: explicitly declared with @visibility public.

Immutable layout choices shared by all dialects.

Selecting a layoutdoctest
$options = new \SqlFormatter\Core\FormatOptions(\SqlFormatter\Core\Style::River, 2);
    $options->style->value // => 'river'
    $options->indentWidth // => 2

Properties§

public Style $style = Style::Expanded
public int $indentWidth = 4

Methods§

public function __construct(public Style $style = Style::Expanded, public int $indentWidth = 4)

Parameters

$styleStyleLayout preset
$indentWidthintSpaces per nested block, from 1 to 16

Throws

InvalidArgumentException When the indentation is outside the supported range
Calls 2

Test cases 29§

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 27

Relations§

Instantiated in 5
Type declarations 5