ParserParameter
Less than 1 minute
ParserParameter
Parses a function or method parameter declaration.
class ParserParameter extends \Hazaar\Parser\PHP\TokenParserProperties
type
public string $typeisNullable
Indicates whether the parameter type is nullable (?Type).
public bool $isNullabledefault
Default parameter value when one is declared.
public mixed $defaultbyRef
Indicates that the parameter is passed by reference (&$param).
public bool $byRefvariadic
Indicates a variadic parameter (...$params).
public bool $variadiccomment
Parameter description resolved from docblock tags, when available.
public string $commentpropertyAccess
public string $propertyAccessMethods
__construct
public __construct(?array $tokens, bool $isNullable): voidParameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | token stream to parse |
$isNullable | bool | whether nullable parsing is pre-set |
parse
Parses a parameter definition at the current token position.
protected parse(array $tokens): boolParameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | token stream pointer positioned around a parameter declaration |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000