| Methods |
public
|
__construct(
Function_|ClassMethod|PropertyHook $functionLike,
string $fileName,
TemplateTypeMap $templateTypeMap,
Type[] $realParameterTypes,
Type[] $phpDocParameterTypes,
Type[] $realParameterDefaultValues,
array<string, list<AttributeReflection>> $parameterAttributes,
Type $realReturnType,
?Type $phpDocReturnType,
?Type $throwType,
?string $deprecatedDescription,
bool $isDeprecated,
bool $isInternal,
?bool $isPure,
bool $acceptsNamedArguments,
Assertions $assertions,
?string $phpDocComment,
Type[] $parameterOutTypes,
array<string, bool> $immediatelyInvokedCallableParameters,
array<string, Type> $phpDocClosureThisTypeParameters,
list<AttributeReflection> $attributes,
)
|
#
|
public
|
isMethodOrPropertyHook(): bool
|
#
|
protected
|
getFunctionLike(): FunctionLike
|
#
|
public
|
getFileName(): string
|
#
|
public
|
getName(): string
|
#
|
public
|
getVariants(): array
|
#
|
public
|
getOnlyVariant(): ExtendedParametersAcceptor
|
#
|
public
|
getNamedArgumentsVariants(): ?array
Returns alternative signatures used when the function is called with named arguments.
Returns null if the named argument variants are the same as regular variants.
Returns alternative signatures used when the function is called with named arguments.
Returns null if the named argument variants are the same as regular variants.
Implements
|
#
|
public
|
getTemplateTypeMap(): TemplateTypeMap
|
#
|
public
|
getResolvedTemplateTypeMap(): TemplateTypeMap
After template type inference at a call site, this map contains the
concrete types inferred for each template parameter.
After template type inference at a call site, this map contains the
concrete types inferred for each template parameter.
Implements
|
#
|
public
|
getParameters(): list<ExtendedParameterReflection>
|
#
|
public
|
isVariadic(): bool
|
#
|
public
|
getReturnType(): Type
|
#
|
public
|
getPhpDocReturnType(): Type
|
#
|
public
|
getNativeReturnType(): Type
|
#
|
public
|
getCallSiteVarianceMap(): TemplateTypeVarianceMap
|
#
|
public
|
getDeprecatedDescription(): ?string
|
#
|
public
|
isDeprecated(): TrinaryLogic
|
#
|
public
|
isInternal(): TrinaryLogic
|
#
|
public
|
getThrowType(): ?Type
|
#
|
public
|
hasSideEffects(): TrinaryLogic
|
#
|
public
|
isBuiltin(): bool
|
#
|
public
|
isGenerator(): bool
|
#
|
public
|
acceptsNamedArguments(): TrinaryLogic
|
#
|
public
|
getAsserts(): Assertions
|
#
|
public
|
getDocComment(): ?string
|
#
|
public
|
returnsByReference(): TrinaryLogic
|
#
|
public
|
isPure(): TrinaryLogic
In most cases hasSideEffects() is more practical as it also accounts
for void return type (functions returning void are always impure).
In most cases hasSideEffects() is more practical as it also accounts
for void return type (functions returning void are always impure).
Implements
|
#
|
public
|
getAttributes(): array
|
#
|
public
|
mustUseReturnValue(): TrinaryLogic
On PHP 8.5+ if the return value is unused at runtime, a warning is emitted.
PHPStan reports this during analysis regardless of PHP version.
On PHP 8.5+ if the return value is unused at runtime, a warning is emitted.
PHPStan reports this during analysis regardless of PHP version.
Implements
|
#
|