Flow PHP

Retype

Read onlyYes
FinalYes

Methods

assert()  : void
proves()  : bool
Whether withType($to) on a column of $from can only fail on top-level nulls: the same kind at every level, and no nested level goes from optional to required (list element, map key / value, structure element by name - optional flag and type).
provesNested()  : bool
proves() one level down, where a null cannot be counted: optional to required is never proven.
sameKind()  : bool
The column kind rule: the same type class, an enum of the same class, a structure of the same element names.

Methods

assert()

public assert(Type<string|int, mixed> $from, Type<string|int, mixed> $to, int $nullCount) : void
Parameters
$from : Type<string|int, mixed>
$to : Type<string|int, mixed>
$nullCount : int
Tags
throws
InvalidArgumentException

proves()

Whether withType($to) on a column of $from can only fail on top-level nulls: the same kind at every level, and no nested level goes from optional to required (list element, map key / value, structure element by name - optional flag and type).

public proves(Type<string|int, mixed> $from, Type<string|int, mixed> $to) : bool
Parameters
$from : Type<string|int, mixed>
$to : Type<string|int, mixed>
Return values
bool

provesNested()

proves() one level down, where a null cannot be counted: optional to required is never proven.

public provesNested(Type<string|int, mixed> $from, Type<string|int, mixed> $to) : bool
Parameters
$from : Type<string|int, mixed>
$to : Type<string|int, mixed>
Return values
bool

sameKind()

The column kind rule: the same type class, an enum of the same class, a structure of the same element names.

public sameKind(Type<string|int, mixed> $from, Type<string|int, mixed> $to) : bool
Parameters
$from : Type<string|int, mixed>
$to : Type<string|int, mixed>
Return values
bool
On this page

Search results