/** * Returns true if Akismet believes the comment to be spam. * * @param CommentInterface $comment * @return bool */ public function isSpam(CommentInterface $comment) { return $this->akismet->isSpam($this->getCommentData($comment)); }
/** * Tells whether or not a new message looks like spam * * @param NewThreadMessage $message * @return boolean true if it is spam, false otherwise */ public function isSpam(NewThreadMessage $message) { return $this->akismet->isSpam(array('comment_author' => (string) $this->participantProvider->getAuthenticatedParticipant(), 'comment_content' => $message->getBody())); }