final class CharacterDomain
    implements ValueDomain

Declares a bounded sequence of complete character/escape atoms with fixed delimiters.

Methods§

public function __construct(
    private non-empty-list<non-empty-string> $atoms,
    private int $minimum = 0,
    private int $maximum = 255,
    private string $prefix = '',
    private string $suffix = '',
    private int $multiple = 1,
)

Parameters

$atomsnon-empty-list<non-empty-string>Complete encoded characters; escapes are indivisible
$minimumint
$maximumint
$prefixstring
$suffixstring
$multipleint

Throws

InvalidArgumentException When length bounds do not form a finite positive interval
Calls 1
  • new InvalidArgumentException line 35
public function match(string $value, int $offset = 0): list<int>

Reads complete atoms using the same delimiters and repetition as construction. Maximum bounds control sampling size; explicit lexical runs may be longer.

Parameters

$valuestring
$offsetint

Returns

list<int>
Test cases 4
Called from 1
Calls 4

Private surface 7§

Implementation details, listed for orientation only.

private positive-int $lengthChoices
private non-empty-list<non-empty-string> $atoms
private int $minimum = 0
private int $maximum = 255
private string $prefix = ''
private string $suffix = ''
private int $multiple = 1

Test cases 73§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 8
Other tests reaching this symbol 65

Relations§

Instantiated in 45
Method calls 6