21 private readonly array $spamRegex,
22 private readonly array $summaryRegex
33 return self::checkInternal( $text, $this->spamRegex );
43 return self::checkInternal( $summary, $this->summaryRegex );
51 private static function checkInternal(
string $text, array $regexes ) {
52 foreach ( $regexes as $regex ) {
54 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(private readonly array $spamRegex, private readonly array $summaryRegex)