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): TrinaryLogic
|
#
|
public
|
acceptsWithReason(Type $type, bool $strictTypes): AcceptsResult
This is like accepts() but gives reasons
why the type was not/might not be accepted in some non-intuitive scenarios.
This is like accepts() but gives reasons
why the type was not/might not be accepted in some non-intuitive scenarios.
In PHPStan 2.0 this method will be removed and the return type of accepts()
will change to AcceptsResult.
Implements
|
#
|
public
|
isSuperTypeOf(Type $type): TrinaryLogic
|
#
|
public
|
isSubTypeOf(Type $otherType): TrinaryLogic
|
#
|
public
|
isAcceptedBy(Type $acceptingType, bool $strictTypes): TrinaryLogic
|
#
|
public
|
isAcceptedWithReasonBy(Type $acceptingType, bool $strictTypes): AcceptsResult
|
#
|
public
|
equals(Type $type): bool
|
#
|
public
|
generalize(GeneralizePrecision $precision): Type
|
#
|
public
|
isSmallerThan(Type $otherType): TrinaryLogic
|
#
|
public
|
isSmallerThanOrEqual(Type $otherType): TrinaryLogic
|
#
|
public
|
isGreaterThan(Type $otherType): TrinaryLogic
|
#
|
public
|
isGreaterThanOrEqual(Type $otherType): TrinaryLogic
|
#
|
public
|
getSmallerType(): Type
|
#
|
public
|
getSmallerOrEqualType(): Type
|
#
|
public
|
getGreaterType(): Type
|
#
|
public
|
getGreaterOrEqualType(): Type
|
#
|
public
|
toBoolean(): BooleanType
|
#
|
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
static
|
__set_state(mixed[] $properties): Type
|
#
|