cmdz/spam-canner 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cmdz/spam-canner

Composer 安装命令:

composer require cmdz/spam-canner

包简介

Extensible Spam Detection Filters based on snook.ca post

README 文档

README

Build Status Coverage Status Scrutinizer Code Quality

Extensible Spam Detection Filters based on this snook.ca post

Installation

Available on Packagist. Autoloading is PSR-4 compatible.

composer require cmdz/spam-canner

Usage

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 = 'http://www.site.de';
$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 snook.ca post for the ideas behind each filter.

Testing

$ phpunit

License

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

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固