@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildArrowFunction
Function: buildArrowFunction()
ts
function buildArrowFunction(options, attributes?): PhpExprArrowFunction;Builds a PHP arrow function expression node.
Parameters
options
Configuration for the arrow function (static, by reference, parameters, return type, expression body, attribute groups).
expr
attrGroups?
byRef?
boolean
params?
PhpParam[]
returnType?
PhpType | null
static?
boolean
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpExprArrowFunction node.
