UnionType
extends Type
Table of Contents
-
$types
: mixed
-
__construct()
: mixed
-
allowsNull()
: bool
-
asString()
: string
-
fromName()
: self
-
fromValue()
: self
-
getReturnTypeDeclaration()
: string
-
isAssignable()
: bool
-
name()
: string
-
ensureMinimumOfTwoTypes()
: void
-
ensureOnlyValidTypes()
: void
$types
private
mixed
$types
-
psalm-var
-
__construct()
public
__construct(Type ...$types) : mixed
Parameters
-
$types
: Type
-
-
throws
-
RuntimeException
Return values
mixed
—
allowsNull()
public
allowsNull() : bool
Return values
bool
—
asString()
public
asString() : string
Return values
string
—
fromName()
public
static fromName(string $typeName, bool $allowsNull) : self
Parameters
-
$typeName
: string
-
-
$allowsNull
: bool
-
Return values
self
—
fromValue()
public
static fromValue(mixed $value, bool $allowsNull) : self
Parameters
-
$value
: mixed
-
-
$allowsNull
: bool
-
Return values
self
—
getReturnTypeDeclaration()
public
getReturnTypeDeclaration() : string
-
deprecated
-
-
codeCoverageIgnore
-
Return values
string
—
isAssignable()
public
isAssignable(Type $other) : bool
Parameters
-
$other
: Type
-
Return values
bool
—
name()
public
name() : string
Return values
string
—
ensureMinimumOfTwoTypes()
private
ensureMinimumOfTwoTypes(Type ...$types) : void
Parameters
-
$types
: Type
-
-
throws
-
RuntimeException
Return values
void
—
ensureOnlyValidTypes()
private
ensureOnlyValidTypes(Type ...$types) : void
Parameters
-
$types
: Type
-
-
throws
-
RuntimeException
Return values
void
—