NikicParameterNode
class NikicParameterNode implements ParameterNode (View source)
Adapter for nikic/php-parser Param nodes.
Methods
No description
Get the parameter name.
Get the parameter attributes (PHP 8.0+).
Check if the parameter is variadic (uses ... operator).
Check if the parameter has a default value in the signature.
Evaluate and return the default value of the parameter.
Details
__construct(Param $param)
No description
string
getName()
Get the parameter name.
TypeNode|null
getType()
Get the parameter type hint from signature.
array
getAttributes()
Get the parameter attributes (PHP 8.0+).
bool
isVariadic()
Check if the parameter is variadic (uses ... operator).
bool
hasDefaultValue()
Check if the parameter has a default value in the signature.
mixed
getDefaultValue()
Evaluate and return the default value of the parameter.
Implementations should evaluate the default expression to a PHP value, resolving named constants (e.g. SORT_REGULAR) via PHP's runtime.