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

$firstnon-empty-string
$restnon-empty-string
$samplePrefixnon-empty-stringPrefix avoids keyword lookup during construction
$maximumint
$excludedlist<string>Case-insensitive whole words excluded by the source action
Test cases 2
public function choose(Closure(positive-int): int $choose): string

Parameters

$chooseClosure(positive-int): int

Returns

string
Test cases 1
Calls 5
public function match(string $value, int $offset = 0): list<int>

Parameters

$valuestring
$offsetint

Returns

list<int>
Test cases 1
Calls 6

Private surface 5§

Implementation details, listed for orientation only.

private non-empty-string $first
private non-empty-string $rest
private non-empty-string $samplePrefix = '_sf'
private int $maximum = 64
private list<string> $excluded = []

Test cases 9§

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 7

Relations§

Instantiated in 2