public function updateCommentsCount(PostInterface $post = null)
    {
        $post->setCommentsCount($post->getCommentsCount() + 1);
        $this->getDocumentManager()->persist($post);
        $this->getDocumentManager()->flush();
    }
public function updateCommentsCount(PostInterface $post = null)
    {
        $post->setCommentsCount($post->getCommentsCount() + 1);
        $this->getDocumentManager()->persist($post);
        $this->getDocumentManager()->flush();
    }
public function updateCommentsCount ( PostInterface $ post = null ) { $ post -> setCommentsCount ( $ post -> getCommentsCount ( ) + 1 ) ; $ this -> getDocumentManager ( ) -> persist ( $ post ) ; $ this -> getDocumentManager ( ) -> flush ( ) ; }
Update the comments count.

@param PostInterface $post
Update the comments count .