classSequenceLexemeGenerator
final class SequenceLexemeGenerator
implements LexemeGenerator
A lazy Cartesian product of child outputs, all realizing the same terminal occurrence.
Methods§
public function __construct(LexemeGenerator ...$generators)Composes complete child sequences in order, preserving their boundary constraints.
Parameters
$generators | LexemeGenerator |
Test cases 3
Calls 1
- function-call
array_valuesline 29
public function generate(LexemeInput $input): ?LexemeCandidatesBuilds the lazy Cartesian product of applicable child candidates.
Parameters
$input | LexemeInput |
Returns
Test cases 2
Calls 3
- new LexemeCandidates line 46
- method-call SequenceLexemeGenerator::product() line 46
- new LexemeSequence line 46
public function product(
list<LexemeCandidates> $results,
int $index,
LexemeSequence $prefix,
): iterable<int, LexemeSequence>Parameters
$results | list<LexemeCandidates> | |
$index | int | |
$prefix | LexemeSequence |
Returns
iterable<int, LexemeSequence>Test cases 2
Called from 2
- method-call SqlFaker\Generation\Candidate\SequenceLexemeGenerator::generate() packages/sql-faker/src/Generation/Candidate/SequenceLexemeGenerator.php:46
- method-call SqlFaker\Generation\Candidate\SequenceLexemeGenerator::product() packages/sql-faker/src/Generation/Candidate/SequenceLexemeGenerator.php:68
Calls 5
- function-call
countline 60 - new SpacingConstraint line 63
- method-call SequenceLexemeGenerator::product() line 68
- new LexemeSequence line 68
- method-call LexemeSequence::sources() line 74
Private surface 1§
Implementation details, listed for orientation only.
private list<LexemeGenerator> $generatorsTest cases 18§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
SequenceLexemeGeneratorTest::testARequiredNonApplicableChildCannotBeOmittedcovers and callsSequenceLexemeGeneratorTest::testGenerateACompoundCandidateKeepsOutputOrderAndConsumesOneOccurrencecovers and callsSequenceLexemeGeneratorTest::testProductRetainsTheWholePrefixAndRejectsAnEmptyRequiredFactorcovers and calls
Other tests reaching this symbol 15
DerivationTraceTestcallsTokenGeneratorTestcallsLexicalExceptionTestcallsLexemeSequenceTestcallsCandidateResolverTestcallsReverseLexemeGeneratorTest::testGenerateCompoundOutputRemainsInOrderAndEofAddsNoBoundarycallsTerminalSequenceTestcallsGenerationContextTestcallsCharsetValueLexemeGeneratorTestcallsDefinitionFactoryTestcallsLexicalGrammarTestcallsMySqlProviderTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsSqliteProviderTestcalls