| Methods |
public
|
getFile(): string
|
#
|
public
|
getFileDescription(): string
|
#
|
public
|
isDeclareStrictTypes(): bool
|
#
|
public
|
isInTrait(): bool
|
#
|
public
|
getTraitReflection(): ?ClassReflection
|
#
|
public
|
getFunction(): ?PhpFunctionFromParserNodeReflection
|
#
|
public
|
getFunctionName(): ?string
|
#
|
public
|
getParentScope(): ?self
|
#
|
public
|
hasVariableType(string $variableName): TrinaryLogic
|
#
|
public
|
getVariableType(string $variableName): Type
|
#
|
public
|
canAnyVariableExist(): bool
|
#
|
public
|
getDefinedVariables(): array<int, string>
|
#
|
public
|
getMaybeDefinedVariables(): array<int, string>
|
#
|
public
|
hasConstant(Name $name): bool
|
#
|
public
|
getPropertyReflection(Type $typeWithProperty, string $propertyName): ?ExtendedPropertyReflection
Deprecated
Use getInstancePropertyReflection or getStaticPropertyReflection instead
Implemented by
|
#
|
public
|
getInstancePropertyReflection(Type $typeWithProperty, string $propertyName): ?ExtendedPropertyReflection
|
#
|
public
|
getStaticPropertyReflection(Type $typeWithProperty, string $propertyName): ?ExtendedPropertyReflection
|
#
|
public
|
getMethodReflection(Type $typeWithMethod, string $methodName): ?ExtendedMethodReflection
|
#
|
public
|
getConstantReflection(Type $typeWithConstant, string $constantName): ?ClassConstantReflection
|
#
|
public
|
getConstantExplicitTypeFromConfig(string $constantName, Type $constantType): Type
|
#
|
public
|
getIterableKeyType(Type $iteratee): Type
|
#
|
public
|
getIterableValueType(Type $iteratee): Type
|
#
|
public
|
isInAnonymousFunction(): bool
|
#
|
public
|
getAnonymousFunctionReflection(): ?ClosureType
|
#
|
public
|
getAnonymousFunctionReturnType(): ?Type
|
#
|
public
|
getType(Expr $node): Type
|
#
|
public
|
getNativeType(Expr $expr): Type
|
#
|
public
|
getKeepVoidType(Expr $node): Type
|
#
|
public
|
getScopeType(Expr $expr): Type
The getType() method along with FNSR enabled
waits for the Expr analysis to be completed
in order to evaluate the type at the right place in the code. This prevents tricky bugs when reasoning about code like
doFoo($a = 1, $a). Sometimes this is counter-productive because we actually want
to use the current Scope object contents to resolve the Expr type. In these cases use getScopeType().
The getType() method along with FNSR enabled
waits for the Expr analysis to be completed
in order to evaluate the type at the right place in the code. This prevents tricky bugs when reasoning about code like
doFoo($a = 1, $a). Sometimes this is counter-productive because we actually want
to use the current Scope object contents to resolve the Expr type. In these cases use getScopeType().
|
#
|
public
|
getScopeNativeType(Expr $expr): Type
|
#
|
public
|
resolveName(Name $name): string
|
#
|
public
|
resolveTypeByName(Name $name): TypeWithClassName
|
#
|
public
|
getTypeFromValue(mixed $value): Type
|
#
|
public
|
hasExpressionType(Expr $node): TrinaryLogic
|
#
|
public
|
isInClassExists(string $className): bool
|
#
|
public
|
isInFunctionExists(string $functionName): bool
|
#
|
public
|
isInClosureBind(): bool
|
#
|
public
|
getFunctionCallStack(): list<FunctionReflection|ExtendedMethodReflection>
|
#
|
public
|
getFunctionCallStackWithParameters(
): list<array{(FunctionReflection|ExtendedMethodReflection), (ExtendedParameterReflection|null)}>
|
#
|
public
|
isParameterValueNullable(Param $parameter): bool
|
#
|
public
|
getFunctionType(Name|Identifier|ComplexType|null $type, bool $isNullable, bool $isVariadic): Type
|
#
|
public
|
isInExpressionAssign(Expr $expr): bool
|
#
|
public
|
isUndefinedExpressionAllowed(Expr $expr): bool
|
#
|
public
|
filterByTruthyValue(Expr $expr): self
|
#
|
public
|
filterByFalseyValue(Expr $expr): self
|
#
|
public
|
isInFirstLevelStatement(): bool
|
#
|
public
|
getPhpVersion(): PhpVersions
|
#
|