final class WordDomain
    implements ValueDomain

A finite spelling choice, including optional empty components.

Methods§

public function __construct(
    private non-empty-list<string> $words,
    private bool $caseInsensitive = false,
)
public function choose(Closure(positive-int): int $choose): string

Parameters

$chooseClosure(positive-int): int

Returns

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

Parameters

$valuestring
$offsetint

Returns

list<int>
Test cases 1
Calls 5

Private surface 2§

Implementation details, listed for orientation only.

private non-empty-list<string> $words
private bool $caseInsensitive = false

Test cases 26§

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 24

Relations§

Instantiated in 43