final class QuotedDomain
    implements ValueDomain

One quoted scanner state: delimiter, optional prefix, doubling and optional backslash escapes.

Methods§

public function __construct(
    private string $quote,
    private non-empty-list<string> $prefixes = [''],
    private bool $backslash = false,
    private int $minimum = 0,
    private int $maximum = 255,
    private non-empty-list<non-empty-string> $alphabet = ['a', 'Z', '0', ' ', "'", '"', '`', '\\', 'é', '猫'],
    private ?string $closing = null,
    private bool $trailingSpace = true,
    private bool $unicodeEscapes = false,
)
public function choose(Closure(positive-int): int $choose): string
public function match(string $value, int $offset = 0): list<int>

Parameters

$valuestring
$offsetint

Returns

list<int>
Test cases 2
Called from 1
Calls 5
public function end(string $value, int $offset): ?int

Private surface 9§

Implementation details, listed for orientation only.

private string $quote
private non-empty-list<string> $prefixes = ['']
private bool $backslash = false
private int $minimum = 0
private int $maximum = 255
private non-empty-list<non-empty-string> $alphabet = ['a', 'Z', '0', ' ', "'", '"', '`', '\\', 'é', '猫']
private ?string $closing = null
private bool $trailingSpace = true
private bool $unicodeEscapes = false

Test cases 18§

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

Dedicated tests 10
Other tests reaching this symbol 8

Relations§

Instantiated in 5
Method calls 1