Expect
in package
FinalYes
Schema generator.
Table of Contents
Methods
- __callStatic() : Type
- anyOf() : AnyOf
- array() : Structure|Type
- arrayOf() : Type
- bool() : Type
- email() : Type
- float() : Type
- from() : Structure
- int() : Type
- list() : Type
- listOf() : Type
- mixed() : Type
- null() : Type
- scalar() : Type
- string() : Type
- structure() : Structure
- type() : Type
- unicode() : Type
Methods
__callStatic()
public
static __callStatic(string $name, array<string|int, mixed> $args) : Type
Parameters
- $name : string
- $args : array<string|int, mixed>
Return values
TypeanyOf()
public
static anyOf(mixed ...$set) : AnyOf
Parameters
- $set : mixed
Return values
AnyOfarray()
public
static array([array<string|int, mixed> $shape = [] ]) : Structure|Type
Parameters
- $shape : array<string|int, mixed> = []
Return values
Structure|TypearrayOf()
public
static arrayOf(string|Schema $valueType[, string|Schema|null $keyType = null ]) : Type
Parameters
Return values
Typebool()
public
static bool([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typeemail()
public
static email([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typefloat()
public
static float([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typefrom()
public
static from(object $object[, array<string|int, mixed> $items = [] ]) : Structure
Parameters
- $object : object
- $items : array<string|int, mixed> = []
Return values
Structureint()
public
static int([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typelist()
public
static list([mixed $default = = '[]' ]) : Type
Parameters
- $default : mixed = = '[]'
Return values
TypelistOf()
public
static listOf(string|Schema $type) : Type
Parameters
- $type : string|Schema
Return values
Typemixed()
public
static mixed([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typenull()
public
static null() : Type
Return values
Typescalar()
public
static scalar([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typestring()
public
static string([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'
Return values
Typestructure()
public
static structure(array<string|int, Schema> $shape) : Structure
Parameters
- $shape : array<string|int, Schema>
Return values
Structuretype()
public
static type(string $type) : Type
Parameters
- $type : string
Return values
Typeunicode()
public
static unicode([mixed $default = = 'null' ]) : Type
Parameters
- $default : mixed = = 'null'