Documentation

SimpleType extends Type
in package

FinalYes
Tags
no-named-arguments

Parameter names are not covered by the backward compatibility promise for this library

Table of Contents

Properties

$allowsNull  : bool
$name  : non-empty-string
$value  : mixed

Methods

__construct()  : mixed
allowsNull()  : bool
asString()  : string
fromName()  : self
fromValue()  : self
isAssignable()  : bool
isCallable()  : bool
isFalse()  : bool
isGenericObject()  : bool
isIntersection()  : bool
isIterable()  : bool
isMixed()  : bool
isNever()  : bool
isNull()  : bool
isObject()  : bool
isSimple()  : bool
isStatic()  : bool
isTrue()  : bool
isUnion()  : bool
isUnknown()  : bool
isVoid()  : bool
name()  : non-empty-string
value()  : mixed
normalize()  : non-empty-string

Properties

Methods

__construct()

public __construct(non-empty-string $name, bool $nullable[, mixed $value = null ]) : mixed
Parameters
$name : non-empty-string
$nullable : bool
$value : mixed = null

allowsNull()

public allowsNull() : bool
Return values
bool

asString()

public asString() : string
Return values
string

fromName()

public static fromName(non-empty-string $typeName, bool $allowsNull) : self
Parameters
$typeName : non-empty-string
$allowsNull : bool
Return values
self

fromValue()

public static fromValue(mixed $value, bool $allowsNull) : self
Parameters
$value : mixed
$allowsNull : bool
Return values
self

isAssignable()

public isAssignable(Type $other) : bool
Parameters
$other : Type
Return values
bool

isCallable()

public isCallable() : bool
Tags
phpstan-assert-if-true

CallableType $this

Return values
bool

isFalse()

public isFalse() : bool
Tags
phpstan-assert-if-true

FalseType $this

Return values
bool

isGenericObject()

public isGenericObject() : bool
Tags
phpstan-assert-if-true

GenericObjectType $this

Return values
bool

isIntersection()

public isIntersection() : bool
Tags
phpstan-assert-if-true

IntersectionType $this

Return values
bool

isIterable()

public isIterable() : bool
Tags
phpstan-assert-if-true

IterableType $this

Return values
bool

isMixed()

public isMixed() : bool
Tags
phpstan-assert-if-true

MixedType $this

Return values
bool

isNever()

public isNever() : bool
Tags
phpstan-assert-if-true

NeverType $this

Return values
bool

isNull()

public isNull() : bool
Tags
phpstan-assert-if-true

NullType $this

Return values
bool

isObject()

public isObject() : bool
Tags
phpstan-assert-if-true

ObjectType $this

Return values
bool

isSimple()

public isSimple() : bool
Return values
bool

isStatic()

public isStatic() : bool
Tags
phpstan-assert-if-true

StaticType $this

Return values
bool

isTrue()

public isTrue() : bool
Tags
phpstan-assert-if-true

TrueType $this

Return values
bool

isUnion()

public isUnion() : bool
Tags
phpstan-assert-if-true

UnionType $this

Return values
bool

isUnknown()

public isUnknown() : bool
Tags
phpstan-assert-if-true

UnknownType $this

Return values
bool

isVoid()

public isVoid() : bool
Tags
phpstan-assert-if-true

VoidType $this

Return values
bool

name()

public name() : non-empty-string
Return values
non-empty-string

normalize()

private normalize(non-empty-string $name) : non-empty-string
Parameters
$name : non-empty-string
Return values
non-empty-string
On this page

Search results