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