final class DefinitionRule
    implements RewriteRule

PT_part_definition requires one partition kind for the list; PT_partition checks its declared count.

Methods§

public function rewrite(TerminalSequence $sequence): TerminalSequence

Uses the explicit partition type, or the first definition for an ADD/REORGANIZE list.

Parameters

Test cases 2
Calls 9
public function declaredKind(
    TerminalSequence $sequence,
    ?int $clause,
): 'HASH'|'LIST'|'RANGE'|null

Returns the enclosing declaration's kind, leaving ALTER lists to infer it from their values.

Parameters

$sequenceTerminalSequence
$clause?int

Returns

'HASH'|'LIST'|'RANGE'|null
Test cases 1
Called from 1
Calls 3
public function inferCount(TerminalSequence $sequence, ?int $clause): TerminalSequence
public function replaceValues(
    TerminalSequence $sequence,
    int $definition,
    int $values,
    'HASH'|'LIST'|'RANGE' $kind,
): TerminalSequence

Replaces incompatible values while preserving the definition and its occurrence identity.

Parameters

$sequenceTerminalSequence
$definitionint
$valuesint
$kind'HASH'|'LIST'|'RANGE'
Test cases 1
Called from 1
Calls 4

Test cases 11§

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

Dedicated tests 5
Other tests reaching this symbol 6

Relations§

Instantiated in 1