20 private $summaryRegex;
27 $this->spamRegex = $spamRegex;
28 $this->summaryRegex = $summaryRegex;
38 return self::checkInternal( $text, $this->spamRegex );
48 return self::checkInternal( $summary, $this->summaryRegex );
56 private static function checkInternal(
string $text, array $regexes ) {
57 foreach ( $regexes as $regex ) {
59 if ( preg_match( $regex, $text,
$matches ) ) {
Service to check if text (either content or a summary) qualifies as spam.
checkSummary(string $summary)
Check whether summary text is considered spam.
checkContent(string $text)
Check whether content text is considered spam.
__construct( $spamRegex, $summaryRegex)