| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\Analyser; |
| 4: | |
| 5: | use PhpParser\Node; |
| 6: | use PhpParser\Node\Expr; |
| 7: | use PhpParser\Node\Name; |
| 8: | use PhpParser\Node\Param; |
| 9: | use PHPStan\Php\PhpVersions; |
| 10: | use PHPStan\Reflection\ClassConstantReflection; |
| 11: | use PHPStan\Reflection\ClassMemberAccessAnswerer; |
| 12: | use PHPStan\Reflection\ClassReflection; |
| 13: | use PHPStan\Reflection\ExtendedMethodReflection; |
| 14: | use PHPStan\Reflection\ExtendedPropertyReflection; |
| 15: | use PHPStan\Reflection\FunctionReflection; |
| 16: | use PHPStan\Reflection\MethodReflection; |
| 17: | use PHPStan\Reflection\NamespaceAnswerer; |
| 18: | use PHPStan\Reflection\ParameterReflection; |
| 19: | use PHPStan\Reflection\ParametersAcceptor; |
| 20: | use PHPStan\Reflection\Php\PhpFunctionFromParserNodeReflection; |
| 21: | use PHPStan\TrinaryLogic; |
| 22: | use PHPStan\Type\Type; |
| 23: | use PHPStan\Type\TypeWithClassName; |
| 24: | |
| 25: | |
| 26: | interface Scope extends ClassMemberAccessAnswerer, NamespaceAnswerer |
| 27: | { |
| 28: | |
| 29: | public const SUPERGLOBAL_VARIABLES = [ |
| 30: | 'GLOBALS', |
| 31: | '_SERVER', |
| 32: | '_GET', |
| 33: | '_POST', |
| 34: | '_FILES', |
| 35: | '_COOKIE', |
| 36: | '_SESSION', |
| 37: | '_REQUEST', |
| 38: | '_ENV', |
| 39: | ]; |
| 40: | |
| 41: | public function getFile(): string; |
| 42: | |
| 43: | public function getFileDescription(): string; |
| 44: | |
| 45: | public function isDeclareStrictTypes(): bool; |
| 46: | |
| 47: | |
| 48: | |
| 49: | |
| 50: | public function isInTrait(): bool; |
| 51: | |
| 52: | public function getTraitReflection(): ?ClassReflection; |
| 53: | |
| 54: | public function getFunction(): ?PhpFunctionFromParserNodeReflection; |
| 55: | |
| 56: | public function getFunctionName(): ?string; |
| 57: | |
| 58: | public function getParentScope(): ?self; |
| 59: | |
| 60: | public function hasVariableType(string $variableName): TrinaryLogic; |
| 61: | |
| 62: | public function getVariableType(string $variableName): Type; |
| 63: | |
| 64: | public function canAnyVariableExist(): bool; |
| 65: | |
| 66: | |
| 67: | |
| 68: | |
| 69: | public function getDefinedVariables(): array; |
| 70: | |
| 71: | |
| 72: | |
| 73: | |
| 74: | public function getMaybeDefinedVariables(): array; |
| 75: | |
| 76: | public function hasConstant(Name $name): bool; |
| 77: | |
| 78: | |
| 79: | public function getPropertyReflection(Type $typeWithProperty, string $propertyName): ?ExtendedPropertyReflection; |
| 80: | |
| 81: | public function getInstancePropertyReflection(Type $typeWithProperty, string $propertyName): ?ExtendedPropertyReflection; |
| 82: | |
| 83: | public function getStaticPropertyReflection(Type $typeWithProperty, string $propertyName): ?ExtendedPropertyReflection; |
| 84: | |
| 85: | public function getMethodReflection(Type $typeWithMethod, string $methodName): ?ExtendedMethodReflection; |
| 86: | |
| 87: | public function getConstantReflection(Type $typeWithConstant, string $constantName): ?ClassConstantReflection; |
| 88: | |
| 89: | public function getConstantExplicitTypeFromConfig(string $constantName, Type $constantType): Type; |
| 90: | |
| 91: | public function getIterableKeyType(Type $iteratee): Type; |
| 92: | |
| 93: | public function getIterableValueType(Type $iteratee): Type; |
| 94: | |
| 95: | |
| 96: | |
| 97: | |
| 98: | |
| 99: | public function isInAnonymousFunction(): bool; |
| 100: | |
| 101: | public function getAnonymousFunctionReflection(): ?ParametersAcceptor; |
| 102: | |
| 103: | public function getAnonymousFunctionReturnType(): ?Type; |
| 104: | |
| 105: | public function getType(Expr $node): Type; |
| 106: | |
| 107: | public function getNativeType(Expr $expr): Type; |
| 108: | |
| 109: | public function getKeepVoidType(Expr $node): Type; |
| 110: | |
| 111: | public function resolveName(Name $name): string; |
| 112: | |
| 113: | public function resolveTypeByName(Name $name): TypeWithClassName; |
| 114: | |
| 115: | |
| 116: | |
| 117: | |
| 118: | public function getTypeFromValue($value): Type; |
| 119: | |
| 120: | public function hasExpressionType(Expr $node): TrinaryLogic; |
| 121: | |
| 122: | public function isInClassExists(string $className): bool; |
| 123: | |
| 124: | public function isInFunctionExists(string $functionName): bool; |
| 125: | |
| 126: | public function isInClosureBind(): bool; |
| 127: | |
| 128: | |
| 129: | public function getFunctionCallStack(): array; |
| 130: | |
| 131: | |
| 132: | public function getFunctionCallStackWithParameters(): array; |
| 133: | |
| 134: | public function isParameterValueNullable(Param $parameter): bool; |
| 135: | |
| 136: | |
| 137: | |
| 138: | |
| 139: | public function getFunctionType($type, bool $isNullable, bool $isVariadic): Type; |
| 140: | |
| 141: | public function isInExpressionAssign(Expr $expr): bool; |
| 142: | |
| 143: | public function isUndefinedExpressionAllowed(Expr $expr): bool; |
| 144: | |
| 145: | public function filterByTruthyValue(Expr $expr): self; |
| 146: | |
| 147: | public function filterByFalseyValue(Expr $expr): self; |
| 148: | |
| 149: | public function isInFirstLevelStatement(): bool; |
| 150: | |
| 151: | public function getPhpVersion(): PhpVersions; |
| 152: | |
| 153: | } |
| 154: | |