classSubstringRule
final class SubstringRule
implements RewriteRule
gram.y:substr_list uses SIMILAR/ESCAPE as argument separators, also accepted inside a_expr.
Methods§
public function rewrite(TerminalSequence $sequence): TerminalSequenceGroups compound arguments after nested operand grouping to keep their operators inside the argument.
Parameters
$sequence | TerminalSequence |
Returns
Test cases 4
SubstringRuleTest::testRewriteKeepsSubstringSeparatorsOutsideCompoundArgumentscallsSubstringRuleTest::testRewriteKeepsSubstringSeparatorsOutsideCompoundArguments#0coversSubstringRuleTest::testRewriteKeepsSubstringSeparatorsOutsideCompoundArguments#1coversSubstringRuleTest::testRewritePreservesAnEmptyArgumentcovers and calls
Calls 4
- function-call
array_fill_keysline 21 - method-call TerminalSequence::occurrences() line 21
- method-call TerminalSequence::range() line 26
- function-call
array_sliceline 32
Test cases 10§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
SubstringRuleTest::testRewriteKeepsSubstringSeparatorsOutsideCompoundArgumentscallsSubstringRuleTest::testRewriteKeepsSubstringSeparatorsOutsideCompoundArguments#0coversSubstringRuleTest::testRewriteKeepsSubstringSeparatorsOutsideCompoundArguments#1coversSubstringRuleTest::testRewritePreservesAnEmptyArgumentcovers and calls
Other tests reaching this symbol 6
MySqlProviderTestcallsGenerationContextTestcallsRewriteDefinitionsTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsSqliteProviderTestcalls