final class IntegerDomain
    implements ValueDomain

Constructs bounded unsigned decimals by prefix intervals, independent of native integer width.

Methods§

public function __construct(
    private string $minimum,
    private ?string $maximum,
    private int $maximumLeadingZeroes = 16,
    private bool $digitSeparators = false,
)

Binds normalized inclusive magnitudes; leading zeroes are spelling choices, not magnitude changes.

Parameters

$minimumstring
$maximum?string
$maximumLeadingZeroesint
$digitSeparatorsbool

Throws

InvalidArgumentException When magnitudes or padding bounds are invalid
Test cases 13
Calls 6
public function choose(Closure(positive-int): int $choose): string
public function normalized(string $value): bool

Checks declaration bounds without interpreting them as machine integers.

Parameters

$valuestring

Returns

bool
Test cases 13
Called from 2
Calls 2
public function match(string $value, int $offset = 0): list<int>
public function compare(string $left, string $right): int

Private surface 7§

Implementation details, listed for orientation only.

private positive-int $widthChoices
private positive-int $paddingChoices
private string $sampleMaximum
private string $minimum
private ?string $maximum
private int $maximumLeadingZeroes = 16
private bool $digitSeparators = false

Test cases 39§

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

Dedicated tests 14
Other tests reaching this symbol 25

Relations§

Instantiated in 5
Method calls 1