args = $args; $this->extends = $extends; $this->implements = $implements; $this->stmts = $stmts; } public static function fromNewNode(Expr\New_ $newNode) { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); assert($class->name === null); return new self( $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes() ); } public function getType(): string { return 'Expr_PrintableNewAnonClass'; } public function getSubNodeNames() : array { return ['args', 'extends', 'implements', 'stmts']; } }