class Type

Constants and helpers for PHP type declarations.

Constants

String

Int

Float

Bool

Array

Object

Callable

Iterable

Void

Never

Mixed

True

False

Null

Self

Parent

Static

STRING

INT

FLOAT

BOOL

ARRAY

OBJECT

CALLABLE

ITERABLE

VOID

NEVER

MIXED

FALSE

NULL

SELF

PARENT

STATIC

Methods

static string
nullable(string $type, bool $nullable = true)

Adds or removes the nullable modifier from a type. For union types, appends or removes |null.

static string
union(string ...$types)

No description

static string
intersection(string ...$types)

No description

Details

at line 90
static string nullable(string $type, bool $nullable = true)

Adds or removes the nullable modifier from a type. For union types, appends or removes |null.

Parameters

string $type
bool $nullable

Return Value

string

at line 114
static string union(string ...$types)

No description

Parameters

string ...$types

Return Value

string

at line 120
static string intersection(string ...$types)

No description

Parameters

string ...$types

Return Value

string