StringTypeNarrower implements TypeNarrower
FinalYes
Interfaces
Methods
- __construct() : mixed
- emitsType() : bool
- narrow() : Type<string|int, mixed>
Methods
__construct()
public
__construct([null|array<int, Type<string|int, mixed>> $emits = null ]) : mixed
Parameters
- $emits : null|array<int, Type<string|int, mixed>> = null
-
- the types this narrower may return; null runs every rung. A rung whose type is not listed never evaluates its predicate.
emitsType()
public
emitsType(Type<string|int, mixed> $type) : bool
Parameters
- $type : Type<string|int, mixed>
Return values
boolnarrow()
public
narrow(mixed $value) : Type<string|int, mixed>
Parameters
- $value : mixed