final class TypeUnion extends Type

Methods

__construct(array $types)

No description

string
__toString()

No description

array
getNames()

Returns the array of subtypes that make up the compound type as strings.

array
getTypes()

Returns the array of subtypes that make up the compound type as Type objects:

string|null
getSingleName()

Returns the type name for simple types, otherwise null.

bool
isUnion()

Returns true whether it is a union type.

bool
isSimple()

Returns true whether it is a simple type. Single nullable types are also considered to be simple types.

bool
isBuiltin()

Returns true whether the type is both a simple and a PHP built-in type.

Details

at line 398
__construct(array $types)

No description

Parameters

array $types

at line 412
string __toString()

No description

Return Value

string

at line 425
array getNames()

Returns the array of subtypes that make up the compound type as strings.

Return Value

array

at line 431
array getTypes()

Returns the array of subtypes that make up the compound type as Type objects:

Return Value

array

at line 437
string|null getSingleName()

Returns the type name for simple types, otherwise null.

Return Value

string|null

at line 443
bool isUnion()

Returns true whether it is a union type.

Return Value

bool

at line 449
bool isSimple()

Returns true whether it is a simple type. Single nullable types are also considered to be simple types.

Return Value

bool

at line 459
bool isBuiltin()

Returns true whether the type is both a simple and a PHP built-in type.

Return Value

bool