@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildClassMethod
Function: buildClassMethod()
ts
function buildClassMethod(
name,
options,
attributes?): PhpStmtClassMethod;Builds a PHP class method declaration statement node.
Parameters
name
The name of the method.
options
Optional configuration for the method (by reference, flags, parameters, return type, statements, attribute groups).
attrGroups?
byRef?
boolean
flags?
number
params?
PhpParam[]
returnType?
PhpType | null
stmts?
PhpStmt[] | null
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpStmtClassMethod node.
