final class BoundedIntegerLexemeGenerator
    implements LexemeGenerator

Restricts MySQL decimal and hexadecimal forms to a source-defined nonnegative 31-bit interval.

Methods§

public function __construct(
    private string $terminal,
    private int $minimum,
    private int $maximum,
    private non-empty-list<string> $defaults,
    private string $definition,
)

Parameters

$terminalstring
$minimumint
$maximumint
$defaultsnon-empty-list<string>
$definitionstring

Throws

InvalidArgumentException When the declared interval exceeds the portable 31-bit domain
Test cases 23
Calls 1
  • new InvalidArgumentException line 36
public function accepts(string $spelling): bool

Rejects oversized hex magnitudes before conversion, including on 32-bit PHP.

Parameters

$spellingstring

Returns

bool
Test cases 24
Called from 1
Calls 7

Private surface 5§

Implementation details, listed for orientation only.

private string $terminal
private int $minimum
private int $maximum
private non-empty-list<string> $defaults
private string $definition

Test cases 33§

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

Dedicated tests 24
Other tests reaching this symbol 9

Relations§

Instantiated in 8