$static
$static : boolean
$params : array<mixed,\PhpParser\Node\Param>
$uses : array<mixed,\PhpParser\Node\Expr\ClosureUse>
$returnType : null|string|\PhpParser\Node\Name|\PhpParser\Node\NullableType
$stmts : array<mixed,\PhpParser\Node>
__construct(array $subNodes = array(), array $attributes = array())
Constructs a lambda function node.
| array | $subNodes | Array of the following optional subnodes: 'static' => false : Whether the closure is static 'byRef' => false : Whether to return by reference 'params' => array(): Parameters 'uses' => array(): use()s 'returnType' => null : Return type 'stmts' => array(): Statements |
| array | $attributes | Additional attributes |
getDocComment() : null|\PhpParser\Comment\Doc
Gets the doc comment of the node.
The doc comment has to be the last comment associated with the node.
Doc comment object or null
| None found |
setDocComment(\PhpParser\Comment\Doc $docComment)
Sets the doc comment of the node.
This will either replace an existing doc comment or add it to the comments array.
| \PhpParser\Comment\Doc | $docComment | Doc comment to set |
| None found |
setAttribute(string $key, mixed $value)
Sets an attribute on a node.
| string | $key | |
| mixed | $value |
| None found |
hasAttribute(string $key) : boolean
Returns whether an attribute exists.
| string | $key |
| None found |
getAttribute(string $key, mixed $default = null) : mixed
Returns the value of an attribute.
| string | $key | |
| mixed | $default |
| None found |
| None found |
| None found |
| None found |
| None found |
getParams() : array<mixed,\PhpParser\Node\Param>
List of parameters
| None found |
getReturnType() : null|string|\PhpParser\Node\Name|\PhpParser\Node\NullableType
Get the declared return type or null
| None found |
getStmts() : array<mixed,\PhpParser\Node\Stmt>
The function body
| None found |