@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildReturn
Function: buildReturn()
ts
function buildReturn(expr, attributes?): PhpStmtReturn;Builds a PHP return statement node.
Parameters
expr
The expression to return, or null for an empty return.
PhpExpr | null
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpStmtReturn node.
