classRules
final class Rules
Restricted visibility: declared "@visibility SqlFormatter". Code outside that scope must not name this declaration.
Recognizes optional syntax by its grammar owner rather than neighboring words.
Methods§
public function __construct(
private array<string, list<list<string>>> $defaults,
private list<string> $joins,
private array<string, string> $distinctParents,
private ?string $selectOptions = null,
private ?string $strictJoin = null,
)Parameters
$defaults | array<string, list<list<string>>> | Optional spellings by grammar rule |
$joins | list<string> | Grammar rules that own join modifiers |
$distinctParents | array<string, string> | Distinct quantifiers eligible under a parent |
$selectOptions | ?string | |
$strictJoin | ?string |
Removes defaults only from the rules in which omission has the same meaning.
Returns
list<Token>Private surface 5§
Implementation details, listed for orientation only.
private array<string, list<list<string>>> $defaultsprivate list<string> $joinsprivate array<string, string> $distinctParentsprivate ?string $selectOptions = nullprivate ?string $strictJoin = nullTest cases 17§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
RulesTestcalls
Other tests reaching this symbol 16
DocumentTestcallsGroupingTestcallsKeywordsTestcallsReductionsTestcallsRendererTestcallsSettingsTest::testInjectedSeparatorPrecedesLexerProbingcallsShapeTestcallsSpacingTestcallsTriviaTestcallsVisitorTestcallsDialectTest::testCompactRulesCanProvideAnIndependentGrammarcallsFormatterTestcallsFormatterTestcallsDialectTestcallsDialectTestcallsDialectTestcalls
Relations§
Instantiated in 3
- new SqlFormatter\Platform\MySql\Dialect::compactRules() packages/sql-formatter/src/Platform/MySql/Dialect.php:48
- new SqlFormatter\Platform\PostgreSql\Dialect::compactRules() packages/sql-formatter/src/Platform/PostgreSql/Dialect.php:48
- new SqlFormatter\Platform\Sqlite\Dialect::compactRules() packages/sql-formatter/src/Platform/Sqlite/Dialect.php:48