Chris@13: addStmt($stmt); Chris@0: } Chris@0: Chris@0: return $this; Chris@0: } Chris@0: Chris@0: /** Chris@0: * Sets doc comment for the declaration. Chris@0: * Chris@0: * @param PhpParser\Comment\Doc|string $docComment Doc comment to set Chris@0: * Chris@0: * @return $this The builder instance (for fluid interface) Chris@0: */ Chris@0: public function setDocComment($docComment) { Chris@13: $this->attributes['comments'] = [ Chris@13: BuilderHelpers::normalizeDocComment($docComment) Chris@13: ]; Chris@0: Chris@0: return $this; Chris@0: } Chris@13: }