TypeWidener
Read onlyYes
FinalYes
Methods
- __construct() : mixed
- nullable() : Type<string|int, mixed>
- `mixed` has no optional form - it already admits null - so wrapping it would throw from a method that must always answer.
- widen() : Type<string|int, mixed>
- widenLists() : ListType<string|int, array<int, mixed>>
- widenMaps() : MapType<string|int, array<string|int, mixed>>
- widenStructures() : StructureType<string|int, array<string|int, mixed>>
Methods
__construct()
public
__construct([Comparator $comparator = new Comparator() ]) : mixed
Parameters
- $comparator : Comparator = new Comparator()
nullable()
`mixed` has no optional form - it already admits null - so wrapping it would throw from a method that must always answer.
public
nullable(Type<string|int, mixed> $type) : Type<string|int, mixed>
Parameters
- $type : Type<string|int, mixed>
Return values
Type<string|int, mixed>widen()
public
widen(Type<string|int, mixed> $left, Type<string|int, mixed> $right) : Type<string|int, mixed>
Parameters
Return values
Type<string|int, mixed>widenLists()
public
widenLists(ListType<string|int, array<int, TLeft>> $left, ListType<string|int, array<int, TRight>> $right) : ListType<string|int, array<int, mixed>>
Parameters
Tags
Return values
ListType<string|int, array<int, mixed>>widenMaps()
public
widenMaps(MapType $left, MapType $right) : MapType<string|int, array<string|int, mixed>>
Parameters
Tags
Return values
MapType<string|int, array<string|int, mixed>>widenStructures()
public
widenStructures(StructureType<string|int, array<string|int, TLeft>> $left, StructureType<string|int, array<string|int, TRight>> $right) : StructureType<string|int, array<string|int, mixed>>
Parameters
- $left : StructureType<string|int, array<string|int, TLeft>>
- $right : StructureType<string|int, array<string|int, TRight>>