function Standard::pExpr_Closure
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ PrettyPrinter/ Standard.php, line 655
Class
Namespace
PhpParser\PrettyPrinterCode
protected function pExpr_Closure(Expr\Closure $node) : string {
return $this->pAttrGroups($node->attrGroups, true) . $this->pStatic($node->static) . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion
->supportsTrailingCommaInParamList()) . ')' . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
}