/** * @param DocBlock $docblock */ public function setDocBlock(DocBlock $docblock) { $docNode = $docblock->asDom($this->ctx->ownerDocument); if ($this->ctx->hasChildNodes()) { $this->ctx->insertBefore($docNode, $this->ctx->firstChild); return; } $this->ctx->appendChild($docNode); }