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