final class UniqueOptionRule
    implements RewriteRule

Applies a source-defined uniqueness condition within one grammar scope.

Methods§

public function __construct(
    private string $scope,
    private string $option,
    private array<string, string> $categories,
    private ?string $separator,
    private string $source,
)

Parameters

$scopestring
$optionstring
$categoriesarray<string, string>First-terminal aliases sharing one source option slot
$separator?string
$sourcestring
Test cases 2
public function rewrite(TerminalSequence $sequence): TerminalSequence

Retains the first occurrence and its full value, without merging independent or nested scopes.

Parameters

Test cases 2
Calls 4

Private surface 5§

Implementation details, listed for orientation only.

private string $scope
private string $option
private array<string, string> $categories
private ?string $separator
private string $source

Test cases 7§

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

Dedicated tests 2
Other tests reaching this symbol 5

Relations§

Instantiated in 2