classIdentifierDomain
final class IdentifierDomain
implements ValueDomain
Scanner start/continuation alphabets with a safe sampling prefix for generated names.
Methods§
public function __construct(
private non-empty-string $first,
private non-empty-string $rest,
private non-empty-string $samplePrefix = '_sf',
private int $maximum = 64,
private list<string> $excluded = [],
)Parameters
$first | non-empty-string | |
$rest | non-empty-string | |
$samplePrefix | non-empty-string | Prefix avoids keyword lookup during construction |
$maximum | int | |
$excluded | list<string> | Case-insensitive whole words excluded by the source action |
public function choose(Closure(positive-int): int $choose): stringParameters
$choose | Closure(positive-int): int |
Returns
stringTest cases 1
IdentifierDomainTest::testChooseKeepsTheSafePrefixAndLengthBudgetcovers and calls
Calls 5
- method-call CharacterDomain::choose() line 37
- new CharacterDomain line 37
- function-call
str_splitline 37 - function-call
maxline 37 - function-call
strlenline 37
public function match(string $value, int $offset = 0): list<int>Parameters
$value | string | |
$offset | int |
Returns
list<int>Test cases 1
Private surface 5§
Implementation details, listed for orientation only.
private non-empty-string $firstprivate non-empty-string $restprivate non-empty-string $samplePrefix = '_sf'private int $maximum = 64private list<string> $excluded = []Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 6
LexicalExceptionTestcallsGenerationContextTestcallsDefinitionFactoryTestcallsLexicalGrammarTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcalls