Remove comments.

@param \Innova\CollecticielBundle\Entity\Comment $comments
493637
public function removeComment(\Innova\CollecticielBundle\Entity\Comment $comments)
    {
        $this->comments->removeElement($comments);
    }
727251
public function removeComment(CommentInterface $comment)
    {
        $this
            ->commentEventDispatcher
            ->dispatchCommentPreRemoveEvent($comment);

        $this
            ->commentDirector
            ->save($comment);

        $this
            ->commentEventDispatcher
            ->dispatchCommentOnRemoveEvent($comment);

        return $this;
    }
1189776
@Deprecated
  public boolean removeComment(Comment comment) {
    if (getComments() != null) {
      return getComments().removeData(comment);
    }
    return false;
  }
67482
private function cleanAnnotations($comment)
    {
        $comment = trim(
            preg_replace(
                '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u',
                '$1',
                $comment
            )
        );

        // reg ex above is not able to remove */ from a single line docblock
        if (substr($comment, -2) == '*/') {
            $comment = trim(substr($comment, 0, -2));
        }

        // normalize strings
        $comment = str_replace(["\r\n", "\r"], "\n", $comment);

        return $comment;
    }
1297269
protected function recordDoc(array $comments)
    {
        $callable = $this->phpdocFactory;

        foreach ($comments as $comment) {
            if ($comment instanceof Doc) {
                $this->doc[] = $callable($comment->getText(), $this->context);
            }
        }
    }
874917
public function removeComment(ResourceComment $comment)
    {
        if ($this->comments->contains($comment)) {
            $this->comments->removeElement($comment);
        }
    }
675807
private function empty_comments() {
		global $wpdb;

		// Empty comments and comment cache
		$comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments" );
		foreach ( $comment_ids as $comment_id ) {
			wp_cache_delete( $comment_id, 'comment' );
			wp_cache_delete( $comment_id, 'comment_meta' );
		}
		$wpdb->query( "TRUNCATE $wpdb->comments" );
		$wpdb->query( "TRUNCATE $wpdb->commentmeta" );
	}
355733
public function addComment(\Innova\CollecticielBundle\Entity\Comment $comments)
    {
        $this->comments[] = $comments;

        return $this;
    }
878284
def clear_commentarea_cache(comment):
    
    parent = comment.content_object
    for instance in CommentsAreaItem.objects.parent(parent):
        instance.clear_cache()
700637
public function deleteComment(int $commentId): bool
    {
        if ( ! $this->validateId($commentId)) {
            return false;
        }

        $result = $this->delete('comments/' . $commentId);

        return 204 === $result->getStatusCode();
    }
701079
public function removeAllAction()
    {
        $isPosted = $this->request->getPost('doRemoveAll');
        
        if (!$isPosted) {
            $this->response->redirect($this->request->getPost('redirect'));
        }

        $comments = new \Phpmvc\Comment\CommentsInSession();
        $comments->setDI($this->di);

        $comments->deleteAll();

        $this->response->redirect($this->request->getPost('redirect'));
    }
888687
public function sanitizeComments($comments)
    {
        $sanitizers = $this->_comment_sanitizer;

        if (isset($sanitizers['format'])) {
            $sanitizers['format'] = $this->_repository
                                         ->getValidator()
                                         ->getFilter($sanitizers['format']);
        }

        foreach ($comments as $comment) {
            $comment->sanitizeData('body', $sanitizers);
        }
    }
526617
public static function removeComments($s)
    {
        $pos = strpos($s, '#');

        return false === $pos ? $s : trim(substr($s, 0, $pos));
    }
121636
public function setComment($comment)
    {
        if ( ! is_string($comment))
        {
            throw new InvalidArgumentException(
                'Expected a string, but got '.gettype($comment)
            );
        }

        $this->comment = $comment;
    }
877001
public function removeArticle($article)
    {
        if ($this->articles->contains($article)) {
            $this->articles->remove($article);
        }
    }
854528
public function addComment($comment)
    {
        if (!in_array($comment, $this->comments, true)) {
            $this->comments[] = $comment;
        }

        return $this;
    }
579560
public static function cleanComment($comment, $glueSeparator = ',', $uniqueValues = true)
    {
        if (!is_scalar($comment) && !is_array($comment)) {
            return '';
        }
        return trim(str_replace('*/', '*[:slash:]', is_scalar($comment) ? $comment : implode($glueSeparator, $uniqueValues ? array_unique($comment) : $comment)));
    }