class ProxiedMethodReflection implements MethodReflection

Describe a method that a proxy passes to its target, returning what the proxy returns.

Methods

__construct(ClassReflection $declaringClass, MethodReflection $targetMethod, Closure $returnType)

Create a proxied method reflection.

string
getName()

Return the method name.

ClassReflection
getDeclaringClass()

Return the proxy class.

bool
isStatic()

Determine whether the method is static.

bool
isPrivate()

Determine whether the method is private.

bool
isPublic()

Determine whether the method is public.

string|null
getDocComment()

Return the method docblock.

ClassMemberReflection
getPrototype()

Return the method prototype.

array
getVariants()

Return the target method's variants with the proxy's parameters and return types.

static FunctionVariant
proxyVariant(ParametersAcceptor $variant, Type $returnType)

Describe a target method's variant as a proxy receives it, returning the given type.

static Type
resolveStaticTypes(Type $type)

Resolve the static types in a type the proxy returns to their classes. PHPStan binds the static types of a proxy's members to the proxy, while they describe the proxy's target.

TrinaryLogic
isDeprecated()

Determine whether the target method is deprecated.

string|null
getDeprecatedDescription()

Return the target method's deprecation description.

TrinaryLogic
isFinal()

Determine whether the method is final.

TrinaryLogic
isInternal()

Determine whether the target method is internal.

Type|null
getThrowType()

Return the target method's throw type.

TrinaryLogic
hasSideEffects()

Determine whether the method has side effects.

Details

at line 31
__construct(ClassReflection $declaringClass, MethodReflection $targetMethod, Closure $returnType)

Create a proxied method reflection.

Parameters

ClassReflection $declaringClass
MethodReflection $targetMethod
Closure $returnType

gets what the proxy returns for the target method's return type

at line 41
string getName()

Return the method name.

Return Value

string

at line 49
ClassReflection getDeclaringClass()

Return the proxy class.

Return Value

ClassReflection

at line 57
bool isStatic()

Determine whether the method is static.

Return Value

bool

at line 65
bool isPrivate()

Determine whether the method is private.

Return Value

bool

at line 73
bool isPublic()

Determine whether the method is public.

Return Value

bool

at line 81
string|null getDocComment()

Return the method docblock.

Return Value

string|null

at line 89
ClassMemberReflection getPrototype()

Return the method prototype.

Return Value

ClassMemberReflection

at line 99
array getVariants()

Return the target method's variants with the proxy's parameters and return types.

Return Value

array

at line 113
static FunctionVariant proxyVariant(ParametersAcceptor $variant, Type $returnType)

Describe a target method's variant as a proxy receives it, returning the given type.

Parameters

ParametersAcceptor $variant
Type $returnType

Return Value

FunctionVariant

at line 129
static Type resolveStaticTypes(Type $type)

Resolve the static types in a type the proxy returns to their classes. PHPStan binds the static types of a proxy's members to the proxy, while they describe the proxy's target.

Parameters

Type $type

Return Value

Type

at line 140
TrinaryLogic isDeprecated()

Determine whether the target method is deprecated.

Return Value

TrinaryLogic

at line 148
string|null getDeprecatedDescription()

Return the target method's deprecation description.

Return Value

string|null

at line 156
TrinaryLogic isFinal()

Determine whether the method is final.

Return Value

TrinaryLogic

at line 164
TrinaryLogic isInternal()

Determine whether the target method is internal.

Return Value

TrinaryLogic

at line 172
Type|null getThrowType()

Return the target method's throw type.

Return Value

Type|null

at line 180
TrinaryLogic hasSideEffects()

Determine whether the method has side effects.

Return Value

TrinaryLogic