class CallableParameterReflection implements ParameterReflection

A required parameter of a callable type the package builds, such as an expected eager-loading callback.

PHPStan's own parameter reflections are not covered by its backward compatibility promise.

Methods

__construct(string $name, Type $type)

Create a callable parameter reflection.

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 21
__construct(string $name, Type $type)

Create a callable parameter reflection.

Parameters

string $name
Type $type

at line 30
string getName()

Return the parameter name.

Return Value

string

at line 38
bool isOptional()

Determine whether the parameter is optional.

Return Value

bool

at line 46
Type getType()

Return the parameter type.

Return Value

Type

at line 54
PassedByReference passedByReference()

Return the parameter reference mode.

Return Value

PassedByReference

at line 62
bool isVariadic()

Determine whether the parameter is variadic.

Return Value

bool

at line 70
Type|null getDefaultValue()

Return the default value type.

Return Value

Type|null