final class RadixDomain
    implements ValueDomain

Prefixed and quoted radix literals. Whole-byte sampling is a charset constraint; the same lexical declaration reads ordinary and explicitly requested bytes.

Methods§

public function __construct(
    private non-empty-string $digits,
    private non-empty-string $prefix,
    private non-empty-list<string> $quotedPrefixes,
    private int $quotedMultiple,
    private int $maximum,
    private bool $ascii = false,
)

Parameters

$digitsnon-empty-string
$prefixnon-empty-string
$quotedPrefixesnon-empty-list<string>
$quotedMultipleint
$maximumint
$asciibool
Test cases 3
public function choose(Closure(positive-int): int $choose): string

Constructs whole ASCII bytes for an introducer and arbitrary radix digits otherwise.

Parameters

$chooseClosure(positive-int): int

Returns

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

Reads complete prefixed runs or a quoted run closed by its first delimiter.

Parameters

$valuestring
$offsetint

Returns

list<int>
Test cases 2
Called from 1
Calls 8
public function digits(string $value): ?string

Private surface 6§

Implementation details, listed for orientation only.

private non-empty-string $digits
private non-empty-string $prefix
private non-empty-list<string> $quotedPrefixes
private int $quotedMultiple
private int $maximum
private bool $ascii = false

Test cases 14§

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

Dedicated tests 3
Other tests reaching this symbol 11

Relations§

Instantiated in 7
Method calls 3