classChoiceSyntax
final class ChoiceSyntax
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Parses and prints the fixture-specific choice extension to relation syntax.
Methods§
public function parse(string $source): RelationChoiceReads a complete choice declaration.
Parameters
$source | string |
Returns
Test cases 3
Called from 1
Calls 13
- function-call
preg_matchline 27 - new UnexpectedPlanTokenException line 28
- static-call RelationChoice::on() line 30
- function-call
trimline 30 - new RelationCursor line 31
- function-call
strlenline 31 - method-call RelationCursor::skipWhitespace() line 32
- method-call RelationCursor::peek() line 33
- function-call
substrline 34 - method-call ChoiceLiteral::read() line 39
- new ChoiceLiteral line 39
- method-call ChoiceSyntax::readRelations() line 42
- method-call RelationCursor::expectEnd() line 48
public function readRelations(RelationCursor $cursor): list<Relation>Reads the ordinary relations enclosed in one branch.
Parameters
$cursor | RelationCursor |
Returns
list<Relation>Test cases 1
Called from 1
Calls 9
- method-call RelationCursor::peek() line 59
- new UnexpectedPlanTokenException line 60
- function-call
in_arrayline 64 - method-call PlanStatements::quotedEnd() line 65
- new PlanStatements line 65
- function-call
trimline 72 - function-call
substrline 72 - method-call PlanParser::parse() line 76
- new PlanParser line 76
public function print(RelationChoice $choice): stringWrites a canonical choice while retaining literal types.
Parameters
$choice | RelationChoice |
Returns
stringTest cases 1
Called from 1
Calls 7
- method-call RelationChoice::branches() line 91
- method-call ChoiceLiteral::print() line 92
- new ChoiceLiteral line 92
- function-call
array_mapline 93 - method-call PlanPrinter::printRelation() line 93
- new PlanPrinter line 93
- function-call
implodeline 94
Test cases 22§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 18
CaseSelectionTestcallsChoiceBindingsTestcallsChoiceValueExceptionTestcallsInverseRelationsTestcallsResolvedRowTestcallsRowChoicesTestcallsRecursiveRelationExceptionTestcallsRelationValueExceptionTestcallsRowBindingsTestcallsPlanGeneratorTestcallsChoiceCaseTestcallsChoiceDefinitionExceptionTestcallsChoiceLiteralTestcallsChoiceValidationTestcallsPlanContentsTestcallsFixturePlanTestcallsRelationChoiceTestcallsFixtureProviderTestcalls