Documentation

MatchTester
in package

Table of Contents

$builtInTypes  : array<string|int, true>
Lookup table of all built-in types
$scalarTypes  : array<string|int, true>
Lookup table of scalar types
isMatch()  : bool
isWeakScalarMatch()  : bool
__construct()  : mixed
Thou shalt not instantiate

Properties

$builtInTypes

Lookup table of all built-in types

private static array<string|int, true> $builtInTypes = [\DaveRandom\CallbackValidator\BuiltInTypes::STRING => true, \DaveRandom\CallbackValidator\BuiltInTypes::INT => true, \DaveRandom\CallbackValidator\BuiltInTypes::FLOAT => true, \DaveRandom\CallbackValidator\BuiltInTypes::BOOL => true, \DaveRandom\CallbackValidator\BuiltInTypes::ARRAY => true, \DaveRandom\CallbackValidator\BuiltInTypes::CALLABLE => true, \DaveRandom\CallbackValidator\BuiltInTypes::VOID => true, \DaveRandom\CallbackValidator\BuiltInTypes::ITERABLE => true]

$scalarTypes

Lookup table of scalar types

private static array<string|int, true> $scalarTypes = [\DaveRandom\CallbackValidator\BuiltInTypes::STRING => true, \DaveRandom\CallbackValidator\BuiltInTypes::INT => true, \DaveRandom\CallbackValidator\BuiltInTypes::FLOAT => true, \DaveRandom\CallbackValidator\BuiltInTypes::BOOL => true]

Methods

isMatch()

public static isMatch(string|null $superTypeName, bool $superTypeNullable, string|null $subTypeName, bool $subTypeNullable, bool $weak) : bool
Parameters
$superTypeName : string|null
$superTypeNullable : bool
$subTypeName : string|null
$subTypeNullable : bool
$weak : bool
Return values
bool

isWeakScalarMatch()

public static isWeakScalarMatch(string $superTypeName, string $subTypeName) : bool
Parameters
$superTypeName : string
$subTypeName : string
Return values
bool

__construct()

Thou shalt not instantiate

private __construct() : mixed
Return values
mixed

Search results