Extensible Spam Detection Filters based on post

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

0.2.1 2015-01-28 02:11 UTC


Build Status Coverage Status Scrutinizer Code Quality

Extensible Spam Detection Filters based on this post


Available on Packagist. Autoloading is PSR-4 compatible.

composer require cmdz/spam-canner


Filters are located in the src/Filters directory. You can add your own filters as well, they just need to implement CmdZ\SpamCanner\Filters\FilterInterface and then add them to the $filters array that you pass to Score()

$spamScoreIncrease = 1;
$currentCommentBody = 'abcd';
$previousCommentBody = 'abcd';

$testLink = '';
$spammyTlds = ['de'];
$domainParser = new \CmdZ\SpamCanner\Utilities\DomainParser;

$filters = [
  new BodyInPreviousComment($spamScoreIncrease, $currentCommentBody, $previousCommentBody),
  new Tlds($spamScoreIncrease, $testLink, $spammyTlds, $domainParser)

$utils = new \CmdZ\SpamCanner\Utilities\Utilities;
$score    = new Score($filters, $utils);
$result   = $score->getScore();
$expected = 2;

Available Filters

See post for the ideas behind each filter.


$ phpunit


The MIT License (MIT). Please see the License File for more information.