Esempio n. 1
0
 /**
  * Setter for docComment
  *
  * @param string $docComment docComment
  * @param boolean $updateNodeDocComment
  * @return void
  */
 public function setDocComment($docComment, $updateNodeDocComment = TRUE)
 {
     $this->docComment = $docComment;
     if ($updateNodeDocComment) {
         if (is_array($this->node->getIgnorables())) {
             foreach ($this->node->getIgnorables() as $ignorable) {
                 if ($ignorable instanceof PHPParser_Node_Ignorable_DocComment) {
                     $ignorable->setValue($this->docComment);
                 }
             }
         } else {
             $this->node->setIgnorables(array(new PHPParser_Node_Ignorable_DocComment($docComment)));
         }
     }
     return $this;
 }