PocketMine-MP 5.28.3 git-6d32ea5850fad9bbdb62b0e6bc1ba9983baba3ba
Loading...
Searching...
No Matches
DaveRandom\CallbackValidator\Type Class Reference
+ Inheritance diagram for DaveRandom\CallbackValidator\Type:
+ Collaboration diagram for DaveRandom\CallbackValidator\Type:

Public Member Functions

 isSatisfiedBy ($typeName, $nullable, $byReference)
 

Public Attributes

 $allowsContravariance
 
 $allowsCovariance
 
 $isByReference
 
 $isNullable
 
 $isWeak
 
 $typeName
 
const NULLABLE = 0x02
 
const REFERENCE = 0x04
 
const WEAK = 0x01
 

Protected Member Functions

 __construct ($typeName, $flags, $allowsCovariance, $allowsContravariance)
 

Detailed Description

Definition at line 5 of file Type.php.

Constructor & Destructor Documentation

◆ __construct()

DaveRandom\CallbackValidator\Type::__construct ( $typeName,
$flags,
$allowsCovariance,
$allowsContravariance )
protected
Parameters
string | null$typeName
int$flags
bool$allowsCovariance
bool$allowsContravariance

Definition at line 70 of file Type.php.

Member Function Documentation

◆ isSatisfiedBy()

DaveRandom\CallbackValidator\Type::isSatisfiedBy ( $typeName,
$nullable,
$byReference )

Whether the type will be satisfied by the specified type name, nullability and by-reference combination

Parameters
string | null$typeName
bool$nullable
bool$byReference
Returns
bool

Definition at line 91 of file Type.php.

References DaveRandom\CallbackValidator\MatchTester\isMatch(), and DaveRandom\CallbackValidator\MatchTester\isWeakScalarMatch().

+ Here is the call graph for this function:

Member Data Documentation

◆ $allowsContravariance

DaveRandom\CallbackValidator\Type::$allowsContravariance

Definition at line 62 of file Type.php.

◆ $allowsCovariance

DaveRandom\CallbackValidator\Type::$allowsCovariance

Definition at line 55 of file Type.php.

◆ $isByReference

DaveRandom\CallbackValidator\Type::$isByReference

Definition at line 41 of file Type.php.

◆ $isNullable

DaveRandom\CallbackValidator\Type::$isNullable

Definition at line 34 of file Type.php.

◆ $isWeak

DaveRandom\CallbackValidator\Type::$isWeak

Definition at line 48 of file Type.php.

◆ $typeName

DaveRandom\CallbackValidator\Type::$typeName

Definition at line 27 of file Type.php.

◆ NULLABLE

const DaveRandom\CallbackValidator\Type::NULLABLE = 0x02

Nullable types are either explicitly ?type (PHP>=7.1) or with a default value of null

Definition at line 15 of file Type.php.

Referenced by DaveRandom\CallbackValidator\ReturnType\createFromReflectionFunctionAbstract(), and DaveRandom\CallbackValidator\ParameterType\createFromReflectionParameter().

◆ REFERENCE

const DaveRandom\CallbackValidator\Type::REFERENCE = 0x04

◆ WEAK

const DaveRandom\CallbackValidator\Type::WEAK = 0x01

Weak mode validates types using the same rules are strict_types=0

Definition at line 10 of file Type.php.


The documentation for this class was generated from the following file: