Removing from list nodes ----- params); ----- params); $stmts[0]->params[] = new Node\Param(new Expr\Variable('x')); $stmts[0]->params[] = new Node\Param(new Expr\Variable('y')); ----- returnType->types); -----