Methods |
public
static
|
fromInterval(?int $min, ?int $max, int $shift = 0): Type
|
#
|
protected
static
|
isDisjoint(?int $minA, ?int $maxA, ?int $minB, ?int $maxB, bool $touchingIsDisjoint = true): bool
|
#
|
public
static
|
createAllSmallerThan(int|float $value): Type
Return the range of integers smaller than the given value
Return the range of integers smaller than the given value
|
#
|
public
static
|
createAllSmallerThanOrEqualTo(int|float $value): Type
Return the range of integers smaller than or equal to the given value
Return the range of integers smaller than or equal to the given value
|
#
|
public
static
|
createAllGreaterThan(int|float $value): Type
Return the range of integers greater than the given value
Return the range of integers greater than the given value
|
#
|
public
static
|
createAllGreaterThanOrEqualTo(int|float $value): Type
Return the range of integers greater than or equal to the given value
Return the range of integers greater than or equal to the given value
|
#
|
public
|
getMin(): ?int
|
#
|
public
|
getMax(): ?int
|
#
|
public
|
describe(VerbosityLevel $level): string
|
#
|
public
|
shift(int $amount): Type
|
#
|
public
|
accepts(Type $type, bool $strictTypes): AcceptsResult
|
#
|
public
|
isSuperTypeOf(Type $type): IsSuperTypeOfResult
|
#
|
public
|
isSubTypeOf(Type $otherType): IsSuperTypeOfResult
|
#
|
public
|
isAcceptedBy(Type $acceptingType, bool $strictTypes): AcceptsResult
|
#
|
public
|
equals(Type $type): bool
|
#
|
public
|
generalize(GeneralizePrecision $precision): Type
|
#
|
public
|
isSmallerThan(Type $otherType, PhpVersion $phpVersion): TrinaryLogic
|
#
|
public
|
isSmallerThanOrEqual(Type $otherType, PhpVersion $phpVersion): TrinaryLogic
|
#
|
public
|
isGreaterThan(Type $otherType, PhpVersion $phpVersion): TrinaryLogic
|
#
|
public
|
isGreaterThanOrEqual(Type $otherType, PhpVersion $phpVersion): TrinaryLogic
|
#
|
public
|
getSmallerType(PhpVersion $phpVersion): Type
|
#
|
public
|
getSmallerOrEqualType(PhpVersion $phpVersion): Type
|
#
|
public
|
getGreaterType(PhpVersion $phpVersion): Type
|
#
|
public
|
getGreaterOrEqualType(PhpVersion $phpVersion): Type
|
#
|
public
|
toBoolean(): BooleanType
|
#
|
public
|
toAbsoluteNumber(): Type
|
#
|
public
|
toString(): Type
|
#
|
public
|
tryUnion(Type $otherType): ?Type
Return the union with another type, but only if it can be expressed in a simpler way than using UnionType
Return the union with another type, but only if it can be expressed in a simpler way than using UnionType
|
#
|
public
|
tryIntersect(Type $otherType): ?Type
Return the intersection with another type, but only if it can be expressed in a simpler way than using
IntersectionType
Return the intersection with another type, but only if it can be expressed in a simpler way than using
IntersectionType
|
#
|
public
|
tryRemove(Type $typeToRemove): ?Type
Return the different with another type, or null if it cannot be represented.
Return the different with another type, or null if it cannot be represented.
Overrides
Implements
|
#
|
public
|
exponentiate(Type $exponent): Type
|
#
|
public
|
getFiniteTypes(): list<ConstantIntegerType>
Returns a list of finite values.
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.
Overrides
Implements
|
#
|
public
|
toPhpDocNode(): TypeNode
|
#
|
public
|
looseCompare(Type $type, PhpVersion $phpVersion): BooleanType
|
#
|