| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Type; |
| 4: | |
| 5: | use PHPStan\Php\PhpVersion; |
| 6: | use PHPStan\PhpDocParser\Ast\Type\TypeNode; |
| 7: | use PHPStan\Reflection\Callables\CallableParametersAcceptor; |
| 8: | use PHPStan\Reflection\ClassMemberAccessAnswerer; |
| 9: | use PHPStan\Reflection\ClassReflection; |
| 10: | use PHPStan\Reflection\ConstantReflection; |
| 11: | use PHPStan\Reflection\ExtendedMethodReflection; |
| 12: | use PHPStan\Reflection\ExtendedPropertyReflection; |
| 13: | use PHPStan\Reflection\PropertyReflection; |
| 14: | use PHPStan\Reflection\Type\UnresolvedMethodPrototypeReflection; |
| 15: | use PHPStan\Reflection\Type\UnresolvedPropertyPrototypeReflection; |
| 16: | use PHPStan\TrinaryLogic; |
| 17: | use PHPStan\Type\Constant\ConstantArrayType; |
| 18: | use PHPStan\Type\Constant\ConstantStringType; |
| 19: | use PHPStan\Type\Enum\EnumCaseObjectType; |
| 20: | use PHPStan\Type\Generic\TemplateTypeMap; |
| 21: | use PHPStan\Type\Generic\TemplateTypeReference; |
| 22: | use PHPStan\Type\Generic\TemplateTypeVariance; |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: | interface Type |
| 29: | { |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public function getReferencedClasses(): array; |
| 35: | |
| 36: | |
| 37: | public function getObjectClassNames(): array; |
| 38: | |
| 39: | |
| 40: | |
| 41: | |
| 42: | public function getObjectClassReflections(): array; |
| 43: | |
| 44: | |
| 45: | |
| 46: | |
| 47: | public function getClassStringObjectType(): Type; |
| 48: | |
| 49: | |
| 50: | |
| 51: | |
| 52: | |
| 53: | public function getObjectTypeOrClassStringObjectType(): Type; |
| 54: | |
| 55: | public function isObject(): TrinaryLogic; |
| 56: | |
| 57: | public function isEnum(): TrinaryLogic; |
| 58: | |
| 59: | |
| 60: | public function getArrays(): array; |
| 61: | |
| 62: | |
| 63: | public function getConstantArrays(): array; |
| 64: | |
| 65: | |
| 66: | public function getConstantStrings(): array; |
| 67: | |
| 68: | public function accepts(Type $type, bool $strictTypes): TrinaryLogic; |
| 69: | |
| 70: | |
| 71: | |
| 72: | |
| 73: | |
| 74: | |
| 75: | |
| 76: | |
| 77: | public function acceptsWithReason(Type $type, bool $strictTypes): AcceptsResult; |
| 78: | |
| 79: | public function isSuperTypeOf(Type $type): TrinaryLogic; |
| 80: | |
| 81: | public function equals(Type $type): bool; |
| 82: | |
| 83: | public function describe(VerbosityLevel $level): string; |
| 84: | |
| 85: | public function canAccessProperties(): TrinaryLogic; |
| 86: | |
| 87: | public function hasProperty(string $propertyName): TrinaryLogic; |
| 88: | |
| 89: | |
| 90: | |
| 91: | |
| 92: | public function getProperty(string $propertyName, ClassMemberAccessAnswerer $scope): PropertyReflection; |
| 93: | |
| 94: | public function getUnresolvedPropertyPrototype(string $propertyName, ClassMemberAccessAnswerer $scope): UnresolvedPropertyPrototypeReflection; |
| 95: | |
| 96: | public function canCallMethods(): TrinaryLogic; |
| 97: | |
| 98: | public function hasMethod(string $methodName): TrinaryLogic; |
| 99: | |
| 100: | public function getMethod(string $methodName, ClassMemberAccessAnswerer $scope): ExtendedMethodReflection; |
| 101: | |
| 102: | public function getUnresolvedMethodPrototype(string $methodName, ClassMemberAccessAnswerer $scope): UnresolvedMethodPrototypeReflection; |
| 103: | |
| 104: | public function canAccessConstants(): TrinaryLogic; |
| 105: | |
| 106: | public function hasConstant(string $constantName): TrinaryLogic; |
| 107: | |
| 108: | public function getConstant(string $constantName): ConstantReflection; |
| 109: | |
| 110: | public function isIterable(): TrinaryLogic; |
| 111: | |
| 112: | public function isIterableAtLeastOnce(): TrinaryLogic; |
| 113: | |
| 114: | public function getArraySize(): Type; |
| 115: | |
| 116: | public function getIterableKeyType(): Type; |
| 117: | |
| 118: | public function getFirstIterableKeyType(): Type; |
| 119: | |
| 120: | public function getLastIterableKeyType(): Type; |
| 121: | |
| 122: | public function getIterableValueType(): Type; |
| 123: | |
| 124: | public function getFirstIterableValueType(): Type; |
| 125: | |
| 126: | public function getLastIterableValueType(): Type; |
| 127: | |
| 128: | public function isArray(): TrinaryLogic; |
| 129: | |
| 130: | public function isConstantArray(): TrinaryLogic; |
| 131: | |
| 132: | public function isOversizedArray(): TrinaryLogic; |
| 133: | |
| 134: | public function isList(): TrinaryLogic; |
| 135: | |
| 136: | public function isOffsetAccessible(): TrinaryLogic; |
| 137: | |
| 138: | public function isOffsetAccessLegal(): TrinaryLogic; |
| 139: | |
| 140: | public function hasOffsetValueType(Type $offsetType): TrinaryLogic; |
| 141: | |
| 142: | public function getOffsetValueType(Type $offsetType): Type; |
| 143: | |
| 144: | public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $unionValues = true): Type; |
| 145: | |
| 146: | public function setExistingOffsetValueType(Type $offsetType, Type $valueType): Type; |
| 147: | |
| 148: | public function unsetOffset(Type $offsetType): Type; |
| 149: | |
| 150: | public function getKeysArray(): Type; |
| 151: | |
| 152: | public function getValuesArray(): Type; |
| 153: | |
| 154: | public function fillKeysArray(Type $valueType): Type; |
| 155: | |
| 156: | public function flipArray(): Type; |
| 157: | |
| 158: | public function intersectKeyArray(Type $otherArraysType): Type; |
| 159: | |
| 160: | public function popArray(): Type; |
| 161: | |
| 162: | public function searchArray(Type $needleType): Type; |
| 163: | |
| 164: | public function shiftArray(): Type; |
| 165: | |
| 166: | public function shuffleArray(): Type; |
| 167: | |
| 168: | |
| 169: | |
| 170: | |
| 171: | public function getEnumCases(): array; |
| 172: | |
| 173: | |
| 174: | |
| 175: | |
| 176: | |
| 177: | |
| 178: | |
| 179: | |
| 180: | |
| 181: | |
| 182: | |
| 183: | |
| 184: | |
| 185: | |
| 186: | |
| 187: | public function getFiniteTypes(): array; |
| 188: | |
| 189: | public function exponentiate(Type $exponent): Type; |
| 190: | |
| 191: | public function isCallable(): TrinaryLogic; |
| 192: | |
| 193: | |
| 194: | |
| 195: | |
| 196: | public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope): array; |
| 197: | |
| 198: | public function isCloneable(): TrinaryLogic; |
| 199: | |
| 200: | public function toBoolean(): BooleanType; |
| 201: | |
| 202: | public function toNumber(): Type; |
| 203: | |
| 204: | public function toInteger(): Type; |
| 205: | |
| 206: | public function toFloat(): Type; |
| 207: | |
| 208: | public function toString(): Type; |
| 209: | |
| 210: | public function toArray(): Type; |
| 211: | |
| 212: | public function toArrayKey(): Type; |
| 213: | |
| 214: | public function isSmallerThan(Type $otherType): TrinaryLogic; |
| 215: | |
| 216: | public function isSmallerThanOrEqual(Type $otherType): TrinaryLogic; |
| 217: | |
| 218: | |
| 219: | |
| 220: | |
| 221: | public function isConstantValue(): TrinaryLogic; |
| 222: | |
| 223: | |
| 224: | |
| 225: | |
| 226: | public function isConstantScalarValue(): TrinaryLogic; |
| 227: | |
| 228: | |
| 229: | |
| 230: | |
| 231: | public function getConstantScalarTypes(): array; |
| 232: | |
| 233: | |
| 234: | |
| 235: | |
| 236: | public function getConstantScalarValues(): array; |
| 237: | |
| 238: | public function isNull(): TrinaryLogic; |
| 239: | |
| 240: | public function isTrue(): TrinaryLogic; |
| 241: | |
| 242: | public function isFalse(): TrinaryLogic; |
| 243: | |
| 244: | public function isBoolean(): TrinaryLogic; |
| 245: | |
| 246: | public function isFloat(): TrinaryLogic; |
| 247: | |
| 248: | public function isInteger(): TrinaryLogic; |
| 249: | |
| 250: | public function isString(): TrinaryLogic; |
| 251: | |
| 252: | public function isNumericString(): TrinaryLogic; |
| 253: | |
| 254: | public function isNonEmptyString(): TrinaryLogic; |
| 255: | |
| 256: | public function isNonFalsyString(): TrinaryLogic; |
| 257: | |
| 258: | public function isLiteralString(): TrinaryLogic; |
| 259: | |
| 260: | public function isClassStringType(): TrinaryLogic; |
| 261: | |
| 262: | public function isVoid(): TrinaryLogic; |
| 263: | |
| 264: | public function isScalar(): TrinaryLogic; |
| 265: | |
| 266: | public function looseCompare(Type $type, PhpVersion $phpVersion): BooleanType; |
| 267: | |
| 268: | public function getSmallerType(): Type; |
| 269: | |
| 270: | public function getSmallerOrEqualType(): Type; |
| 271: | |
| 272: | public function getGreaterType(): Type; |
| 273: | |
| 274: | public function getGreaterOrEqualType(): Type; |
| 275: | |
| 276: | |
| 277: | |
| 278: | |
| 279: | |
| 280: | |
| 281: | |
| 282: | |
| 283: | |
| 284: | |
| 285: | |
| 286: | |
| 287: | |
| 288: | |
| 289: | |
| 290: | |
| 291: | |
| 292: | public function getTemplateType(string $ancestorClassName, string $templateTypeName): Type; |
| 293: | |
| 294: | |
| 295: | |
| 296: | |
| 297: | |
| 298: | |
| 299: | |
| 300: | public function inferTemplateTypes(Type $receivedType): TemplateTypeMap; |
| 301: | |
| 302: | |
| 303: | |
| 304: | |
| 305: | |
| 306: | |
| 307: | |
| 308: | |
| 309: | |
| 310: | |
| 311: | |
| 312: | |
| 313: | |
| 314: | |
| 315: | |
| 316: | |
| 317: | |
| 318: | public function getReferencedTemplateTypes(TemplateTypeVariance $positionVariance): array; |
| 319: | |
| 320: | public function toAbsoluteNumber(): Type; |
| 321: | |
| 322: | |
| 323: | |
| 324: | |
| 325: | |
| 326: | |
| 327: | |
| 328: | |
| 329: | |
| 330: | public function traverse(callable $cb): Type; |
| 331: | |
| 332: | |
| 333: | |
| 334: | |
| 335: | |
| 336: | |
| 337: | public function traverseSimultaneously(Type $right, callable $cb): Type; |
| 338: | |
| 339: | public function toPhpDocNode(): TypeNode; |
| 340: | |
| 341: | |
| 342: | |
| 343: | |
| 344: | |
| 345: | |
| 346: | public function tryRemove(Type $typeToRemove): ?Type; |
| 347: | |
| 348: | public function generalize(GeneralizePrecision $precision): Type; |
| 349: | |
| 350: | |
| 351: | |
| 352: | |
| 353: | public static function __set_state(array $properties): self; |
| 354: | |
| 355: | } |
| 356: | |