Insertion into list nodes ----- stmts[] = new Stmt\Expression(new Expr\Variable('baz')); ----- params[] = new Node\Param(new Expr\Variable('param2')); ----- catches[0]->types[] = new Node\Name('Bar'); ----- params, new Node\Param(new Expr\Variable('param0'))); ----- params[] = new Node\Param(new Expr\Variable('param0')); ----- elseifs[] = new Stmt\ElseIf_(new Expr\Variable('cond3'), []); ----- catches[] = new Stmt\Catch_([new Node\Name('Bar')], new Expr\Variable('bar'), []); ----- setAttribute('comments', [new Comment('// Test')]); $stmts[] = $node; ----- setAttribute('comments', [new Comment('// Test'), new Comment('// Test 2')]); $stmts[0]->stmts[] = $node; ----- name->name = 'Xyz'; ----- stmts, $node); ----- setAttribute('comments', [new Comment('// Test')]); array_unshift($stmts[0]->stmts, $node); ----- setAttribute('comments', [new Comment('// Test')]); array_unshift($stmts[0]->stmts, $node); ----- setAttribute('comments', [new Comment('// Test')]); array_unshift($stmts[0]->stmts, $node); $stmts[0]->stmts[1]->setAttribute('comments', [new Comment('// Bar foo')]); ----- setAttribute('comments', [new Comment('// Test')]); array_unshift($stmts[0]->stmts, $node); $stmts[0]->stmts[1]->setAttribute('comments', []); ----- stmts, new Stmt\Expression(new Expr\Variable('a')), new Stmt\Expression(new Expr\Variable('b'))); ----- stmts = [ new Stmt\Expression(new Expr\Variable('a')), new Stmt\Expression(new Expr\Variable('b')), ]; ----- expr->expr->items, new Expr\ArrayItem(new Scalar\LNumber(42))); $stmts[0]->expr->expr->items[] = new Expr\ArrayItem(new Scalar\LNumber(24)); ----- expr->expr->items[] = new Expr\ArrayItem(new Scalar\LNumber(24)); ----- returnType->types[] = new Node\Name('C'); ----- returnType->types[] = new Node\Name('C'); ----- stmts; array_splice($fnStmts, 0, 1, $fnStmts[0]->stmts); ----- expr->var->items, 1, 0, [null]); ----- stmts[] = new Stmt\Expression(new Expr\Variable('c')); -----