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

Construction invariants shared by immutable catalog values.

Methods§

public static function ensure(bool $condition, string $message): void

Rejects invalid public construction even when PHP assertions are disabled.

Parameters

$conditionbool
$messagestring

Throws

InvalidArgumentException When a state invariant does not hold
Called from 15
Calls 1
  • new InvalidArgumentException line 25
public static function members<T>(array<array-key, T> $members, class-string $class): void
public static function names<T>(array<array-key, T> $names): void

Parameters

$namesarray<array-key, T>

Throws

InvalidArgumentException When a name has the wrong type or the list has the wrong shape Requires an ordered list of names; dialects may allow empty quoted names.
Called from 4
Calls 3
public static function table(TableDefinition $table, Dialect $dialect): void

Validates the names and types of a table in its state's dialect.

Parameters

Throws

InvalidArgumentException When column identities, types or local keys conflict
Called from 1
Calls 3

Test cases 7§

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

Dedicated tests 1
Other tests reaching this symbol 6

Relations§

Static calls 20