Methods |
public
|
__construct()
|
#
|
public
|
getConstantStrings(): array
|
#
|
public
|
getConstantScalarTypes(): array
|
#
|
public
|
getConstantScalarValues(): array
|
#
|
public
|
describe(VerbosityLevel $level): string
|
#
|
public
|
toNumber(): Type
|
#
|
public
|
toAbsoluteNumber(): Type
|
#
|
public
|
toString(): Type
|
#
|
public
|
toInteger(): Type
|
#
|
public
|
toFloat(): Type
|
#
|
public
|
toArray(): Type
|
#
|
public
|
toArrayKey(): Type
|
#
|
public
|
toCoercedArgumentType(bool $strictTypes): Type
Tells how a type might change when passed to an argument
or assigned to a typed property. Example: int is accepted by int|float with strict_types = 1
Stringable is accepted by string|Stringable even without strict_types. Note: Logic with $strictTypes=false is mostly not implemented in Type subclasses.
Tells how a type might change when passed to an argument
or assigned to a typed property. Example: int is accepted by int|float with strict_types = 1
Stringable is accepted by string|Stringable even without strict_types. Note: Logic with $strictTypes=false is mostly not implemented in Type subclasses.
Overridden by
Implements
|
#
|
public
|
isOffsetAccessLegal(): TrinaryLogic
|
#
|
public
|
isNull(): TrinaryLogic
|
#
|
public
|
isTrue(): TrinaryLogic
|
#
|
public
|
isFalse(): TrinaryLogic
|
#
|
public
|
isBoolean(): TrinaryLogic
|
#
|
public
|
isScalar(): TrinaryLogic
|
#
|
public
|
looseCompare(Type $type, PhpVersion $phpVersion): BooleanType
|
#
|
public
|
tryRemove(Type $typeToRemove): ?Type
Return the difference with another type, or null if it cannot be represented.
Return the difference with another type, or null if it cannot be represented.
Implements
|
#
|
public
|
getFiniteTypes(): array
Returns a list of finite values. Examples: - for bool: [true, false]
- for int<0, 3>: [0, 1, 2, 3]
- for enums: list of enum cases
- for scalars: the scalar itself For infinite types it returns an empty array.
Returns a list of finite values. Examples: - for bool: [true, false]
- for int<0, 3>: [0, 1, 2, 3]
- for enums: list of enum cases
- for scalars: the scalar itself For infinite types it returns an empty array.
Implements
|
#
|
public
|
exponentiate(Type $exponent): Type
|
#
|
public
|
toPhpDocNode(): TypeNode
|
#
|
public
|
toTrinaryLogic(): TrinaryLogic
|
#
|