Interface PHPStan\Type\ConstantScalarType

extends Type

A type whose value is known at analysis time — a compile-time constant scalar. Implemented by ConstantIntegerType, ConstantFloatType, ConstantStringType, ConstantBooleanType, and NullType. Use Type::isConstantValue() to check if a type is constant without instanceof, and Type::getConstantScalarTypes() to extract constant types from unions.

Methods
Methods inherited from PHPStan\Type\Type
getReferencedClasses(), getObjectClassNames(), getObjectClassReflections(), getClassStringObjectType(), getObjectTypeOrClassStringObjectType(), isObject(), isEnum(), getArrays(), getConstantArrays(), getConstantStrings(), accepts(), isSuperTypeOf(), equals(), describe(), canAccessProperties(), hasProperty(), getProperty(), getUnresolvedPropertyPrototype(), hasInstanceProperty(), getInstanceProperty(), getUnresolvedInstancePropertyPrototype(), hasStaticProperty(), getStaticProperty(), getUnresolvedStaticPropertyPrototype(), canCallMethods(), hasMethod(), getMethod(), getUnresolvedMethodPrototype(), canAccessConstants(), hasConstant(), getConstant(), isIterable(), isIterableAtLeastOnce(), getArraySize(), getIterableKeyType(), getFirstIterableKeyType(), getLastIterableKeyType(), getIterableValueType(), getFirstIterableValueType(), getLastIterableValueType(), isArray(), isConstantArray(), isOversizedArray(), isList(), isOffsetAccessible(), isOffsetAccessLegal(), hasOffsetValueType(), getOffsetValueType(), setOffsetValueType(), setExistingOffsetValueType(), unsetOffset(), getKeysArrayFiltered(), getKeysArray(), getValuesArray(), chunkArray(), fillKeysArray(), flipArray(), intersectKeyArray(), popArray(), reverseArray(), searchArray(), shiftArray(), shuffleArray(), sliceArray(), spliceArray(), getEnumCases(), getEnumCaseObject(), getFiniteTypes(), exponentiate(), isCallable(), getCallableParametersAcceptors(), isCloneable(), toBoolean(), toNumber(), toInteger(), toFloat(), toString(), toArray(), toArrayKey(), toCoercedArgumentType(), isSmallerThan(), isSmallerThanOrEqual(), isConstantValue(), isConstantScalarValue(), getConstantScalarTypes(), getConstantScalarValues(), isNull(), isTrue(), isFalse(), isBoolean(), isFloat(), isInteger(), isString(), isNumericString(), isNonEmptyString(), isNonFalsyString(), isLiteralString(), isLowercaseString(), isUppercaseString(), isClassString(), isVoid(), isScalar(), looseCompare(), getSmallerType(), getSmallerOrEqualType(), getGreaterType(), getGreaterOrEqualType(), getTemplateType(), inferTemplateTypes(), getReferencedTemplateTypes(), toAbsoluteNumber(), traverse(), traverseSimultaneously(), toPhpDocNode(), tryRemove(), generalize(), hasTemplateOrLateResolvableType()