ParserParameter
Less than 1 minute
ParserParameter
Parses a function or method parameter declaration.
class ParserParameter extends \Hazaar\Parser\PHP\TokenParserExtends: Hazaar\Parser\PHP\TokenParser
Properties
type
public string $typeType: string
isNullable
Indicates whether the parameter type is nullable (?Type).
public bool $isNullableType: bool
default
Default parameter value when one is declared.
public mixed $defaultType: mixed
byRef
Indicates that the parameter is passed by reference (&$param).
public bool $byRefType: bool
variadic
Indicates a variadic parameter (...$params).
public bool $variadicType: bool
comment
Parameter description resolved from docblock tags, when available.
public string $commentType: string
propertyAccess
public string $propertyAccessType: string
readonly
Indicates a readonly constructor-promoted property (readonly).
public bool $readonlyType: bool
typeLink
public string $typeLinkType: string
Methods
__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): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | token stream pointer positioned around a parameter declaration |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000