@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildMatchArm
Function: buildMatchArm()
ts
function buildMatchArm(
conds,
body,
attributes?): PhpMatchArm;Builds a PHP match arm node.
Parameters
conds
An array of expressions representing the conditions for this arm, or null for the default arm.
PhpExpr[] | null
body
The expression to execute if the conditions match.
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpMatchArm node.
