classLexicalObservation
final class LexicalObservation
Extracts finite definition features and detailed diagnostics without consuming generation choices.
Type Aliases§
Origin = array{id: int, name: string, ancestors: list<int>, rules: list<string>, rewrite: string|null}Methods§
public function features(ResolvedOutput $output): array<string, list<string>>Keeps random value text out of cumulative feature IDs while retaining compound structure and version provenance.
Parameters
$output | ResolvedOutput |
Returns
array<string, list<string>>Test cases 1
Called from 1
public function sources(ResolvedOutput $output): array<int, list<string>>Retains every contributing source, including the selected VersionCase.
Parameters
$output | ResolvedOutput |
Returns
array<int, list<string>>Test cases 1
public function conditions(ResolvedOutput $output): array<int, array{left: array{allowed: int, rules: list<string>}|null, boundaries: array<int, array{allowed: int, rules: list<string>}>}>Preserves each candidate's pending and internal boundary masks before they are intersected.
Parameters
$output | ResolvedOutput |
Returns
array<int, array{left: array{allowed: int, rules: list<string>}|null, boundaries: array<int, array{allowed: int, rules: list<string>}>}>Test cases 1
Called from 1
Calls 1
- function-call
array_mapline 72
public function rewrites(TerminalSequence $sequence): list<Rewrite>Converts compact rewrite operations to serializable before/after occurrences, preserving intermediate states.
Parameters
$sequence | TerminalSequence |
Returns
list<Rewrite>Test cases 1
Called from 1
Calls 1
- function-call
array_mapline 85
Test cases 11§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
LexicalObservationTest::testConditionsRetainsTheInputMasksAndAllContributingRulescovers and callsLexicalObservationTest::testFeaturesKeepsValueTextOutOfFiniteDefinitionSetscovers and callsLexicalObservationTest::testRewritesRetainsEachIntermediateReplacementAndOriginalIdentitycovers and callsLexicalObservationTest::testSourcesRetainsAllCandidateProvenanceInOccurrenceOrdercovers and calls
Other tests reaching this symbol 7
ByteChoicesTestcallsCoverageSnapshotStoreTestcallsGrammarCoverageInventoryTestcallsGrammarCoverageTestcallsSnapshotValidationTestcallsDerivationNodeTestcallsSqlGeneratorTestcalls
Relations§
Instantiated in 2
Method calls 4
- method-call SqlFaker\Generation\Coverage\GrammarCoverage::recordSequence() packages/sql-faker/src/Generation/Coverage/GrammarCoverage.php:179
- method-call SqlFaker\Generation\Coverage\GrammarCoverage::recordOutput() packages/sql-faker/src/Generation/Coverage/GrammarCoverage.php:192
- method-call SqlFaker\Generation\Coverage\GrammarCoverage::recordOutput() packages/sql-faker/src/Generation/Coverage/GrammarCoverage.php:193
- method-call SqlFaker\Generation\Coverage\GrammarCoverage::recordOutput() packages/sql-faker/src/Generation/Coverage/GrammarCoverage.php:194