final class LiteralGenerator
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Generates PostgreSql literal bodies for the bounded lexical API.

Owns the alphabets and numeric formatting used by this dialect.

Methods§

public function __construct(Generator $faker)

Parameters

$fakerGeneratorSource of every choice the generated strings make
Test cases 521
Calls 1
public function mixedAlnumString(int $minLength = 1, int $maxLength = 24): string

Generate a random string from the mixed alphanumeric+underscore alphabet.

Parameters

$minLengthint
$maxLengthint

Returns

string
Test cases 14
Called from 2
Calls 3
public function decimalString(int $precision = 13, int $scale = 6): non-empty-string

Generate a random decimal literal string.

Parameters

$precisionint
$scaleint

Returns

non-empty-string
Test cases 17
Called from 1
Calls 4
public function floatString(
    string $mantissa,
    int $minExponent = -20,
    int $maxExponent = 20,
): non-empty-string

Private surface 7§

Implementation details, listed for orientation only.

private const ALPHA_UNDERSCORE = 'abcdefghijklmnopqrstuvwxyz_'
private const ALNUM_UNDERSCORE = 'abcdefghijklmnopqrstuvwxyz0123456789_'
private const MIXED_ALNUM_UNDERSCORE = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
private const HEX_CHARS = '0123456789abcdef'
private const BINARY_CHARS = '01'
private Generator $faker
private RandomCharacters $characters

Test cases 524§

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

Dedicated tests 31
Other tests reaching this symbol 493

Relations§

Instantiated in 1
Method calls 9
Type declarations 1