class ProxiedParameterReflection implements ParameterReflection

Describe a target method's parameter as a proxy receives it. A proxy's __call() gets the argument values, so the caller's variable is never passed by reference. The parameter has none of PHPStan's extended metadata, such as a closure binding the target declares.

Methods

__construct(ParameterReflection $parameter)

Create a proxied parameter reflection.

static array
fromTargetParameters(array $parameters)

Describe a target's parameters as a proxy receives them.

string
getName()

Return the parameter name.

bool
isOptional()

Determine whether the parameter is optional.

Type
getType()

Return the parameter type.

PassedByReference
passedByReference()

Return the parameter reference mode.

bool
isVariadic()

Determine whether the parameter is variadic.

Type|null
getDefaultValue()

Return the default value type.

Details

at line 23
__construct(ParameterReflection $parameter)

Create a proxied parameter reflection.

Parameters

ParameterReflection $parameter

at line 36
static array fromTargetParameters(array $parameters)

Describe a target's parameters as a proxy receives them.

Other parameters stay as they are, keeping PHPStan's extended metadata such as closure-this types.

Parameters

array $parameters

Return Value

array

at line 49
string getName()

Return the parameter name.

Return Value

string

at line 57
bool isOptional()

Determine whether the parameter is optional.

Return Value

bool

at line 65
Type getType()

Return the parameter type.

Return Value

Type

at line 73
PassedByReference passedByReference()

Return the parameter reference mode.

Return Value

PassedByReference

at line 81
bool isVariadic()

Determine whether the parameter is variadic.

Return Value

bool

at line 89
Type|null getDefaultValue()

Return the default value type.

Return Value

Type|null