classDocument
final class Document
Restricted visibility: declared "@visibility SqlFormatter". Code outside that scope must not name this declaration.
Tokens and grammar-derived layout marks, indexed in source order.
Properties§
public list<Token> $tokens = []public array<int, int> $clauses = []public array<int, true> $commas = []public array<int, true> $logical = []public array<int, true> $unary = []public array<int, int> $pairs = []public array<int, true> $blocks = []public array<int, int> $casePairs = []public array<int, true> $caseBranches = []public string $trailingMethods§
public function __construct(public string $trailing)Retains trivia following the root node.
Parameters
$trailing | string |
Collects tokens and determines grammar and nesting boundaries.
Returns
selfTest cases 10
BlockTest::testRenderFormatsNestedBlockscallsElementsTest::testWriteFormatsCaseBranchescallsHeadersTest::testLengthIncludesInterwordSpacescallsHeadersTest::testWidthExcludesNestedQueryHeaderscallsHeadersTest::testWriteAlignsRiverHeadercallsRendererTest::testRenderExpandedPreservesSpellingcallsAnalyzerTest::testVisitKeepsTokensInSourceOrdercallsDocumentTest::testFromDistinguishesFunctionAndProjectionCommascallsListsTest::testMarkKeepsFunctionArgumentCommasInlinecallsMarkersTest::testApplyPreservesBetweenConjunctioncalls
Called from 1
Calls 4
- new
selfline 66 - method-call Analyzer::visit() line 67
- new Analyzer line 67
- static-call Brackets::mark() line 68
Test cases 21§
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 20
SettingsTestcallsFormatterTestcallsBlockTest::testRenderFormatsNestedBlockscallsElementsTest::testWriteFormatsCaseBranchescallsHeadersTest::testLengthIncludesInterwordSpacescallsHeadersTest::testWidthExcludesNestedQueryHeaderscallsHeadersTest::testWriteAlignsRiverHeadercallsRendererTest::testRenderExpandedPreservesSpellingcallsAnalyzerTest::testVisitKeepsTokensInSourceOrdercallsBracketsTest::testMarkPairsNestedParenthesescallsExpressionsTest::testMarkDistinguishesRangeAndBooleanConjunctionscallsExpressionsTest::testMarkRecordsCaseAndUnarySigncallsHeadersTest::testMarkDoesNotTreatIdentifierAsClausecallsHeadersTest::testMarkRecognizesLongestHeadercallsListsTest::testMarkKeepsFunctionArgumentCommasInlinecallsMarkersTest::testApplyPreservesBetweenConjunctioncallsFormatterTestcallsDialectTestcallsDialectTestcallsDialectTestcalls
Relations§
Static calls 1
Type declarations 10
- type SqlFormatter\Core\Layout\Block packages/sql-formatter/src/Core/Layout/Block.php:20
- type SqlFormatter\Core\Layout\Elements packages/sql-formatter/src/Core/Layout/Elements.php:20
- type SqlFormatter\Core\Layout\Headers packages/sql-formatter/src/Core/Layout/Headers.php:19
- type SqlFormatter\Core\Layout\Renderer packages/sql-formatter/src/Core/Layout/Renderer.php:22
- type SqlFormatter\Core\Syntax\Analyzer packages/sql-formatter/src/Core/Syntax/Analyzer.php:20
- type SqlFormatter\Core\Syntax\Brackets packages/sql-formatter/src/Core/Syntax/Brackets.php:17
- type SqlFormatter\Core\Syntax\Expressions packages/sql-formatter/src/Core/Syntax/Expressions.php:17
- type SqlFormatter\Core\Syntax\Headers packages/sql-formatter/src/Core/Syntax/Headers.php:17
- type SqlFormatter\Core\Syntax\Lists packages/sql-formatter/src/Core/Syntax/Lists.php:17
- type SqlFormatter\Core\Syntax\Markers packages/sql-formatter/src/Core/Syntax/Markers.php:17