classShape
final class Shape
Restricted visibility: declared "@visibility SqlFormatter". Code outside that scope must not name this declaration.
Compares canonical syntax while retaining operand nesting and operator association.
Methods§
public function __construct(
private array<int, Token> $tokens,
private array<int, true> $grouping,
)Parameters
$tokens | array<int, Token> | Canonical tokens indexed by original offset |
$grouping | array<int, true> | Expression parentheses excluded from the shape |
Collapses empty and single-child grammar wrappers, but preserves branching.
Returns
?stringTest cases 1
Called from 2
Calls 4
- function-call
hashline 35 - function-call
serializeline 35 - method-call Shape::of() line 39
- function-call
countline 44
Private surface 2§
Implementation details, listed for orientation only.
private array<int, Token> $tokensprivate array<int, true> $groupingTest 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
DocumentTestcallsGroupingTestcallsKeywordsTestcallsReductionsTestcallsRendererTestcallsRulesTestcallsSettingsTestcallsSpacingTestcallsTriviaTestcallsVisitorTestcallsFormatterTestcallsFormatterTestcallsDialectTestcallsDialectTestcallsDialectTestcalls