function ArrowFunction::__construct
Parameters
array{: expr: Expr, static?: bool, byRef?: bool, params?: Node\Param[], returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, attrGroups?: Node\AttributeGroup[] } $subNodes Array of the following subnodes: 'expr' : Expression body 'static' => false : Whether the closure is static 'byRef' => false : Whether to return by reference 'params' => array() : Parameters 'returnType' => null : Return type 'attrGroups' => array() : PHP attribute groups
array<string, mixed> $attributes Additional attributes:
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Expr/ ArrowFunction.php, line 44
Class
Namespace
PhpParser\Node\ExprCode
public function __construct(array $subNodes, array $attributes = []) {
$this->attributes = $attributes;
$this->static = $subNodes['static'] ?? false;
$this->byRef = $subNodes['byRef'] ?? false;
$this->params = $subNodes['params'] ?? [];
$this->returnType = $subNodes['returnType'] ?? null;
$this->expr = $subNodes['expr'];
$this->attrGroups = $subNodes['attrGroups'] ?? [];
}