webignition / sfs-result-analyser
Analyses results from api.stopforumspam.com, helps you figure out what to do
Requires
- php: >=7.2.0
- webignition/sfs-result-interfaces: >=0.5,<1
Requires (Dev)
- phpstan/phpstan: ^0.11.5
- phpunit/phpunit: ^8.1
- squizlabs/php_codesniffer: ^3
- webignition/sfs-result-factory: >=0.1,<1
This package is auto-updated.
Last update: 2024-10-13 00:26:13 UTC
README
Analyses results from api.stopforumspam.com, helps you figure out what to do.
Why?
You can use webignition/sfs-client to query api.stopforumspam.com and get back one or more webignition\SfsResultInterfaces\ResultInterface objects.
You've probably queried api.stopforumspam.com because you need to know if a given email address, IP address or username is known to be untrustworthy.
This helps with that.
Installation
composer require webignition/sfs-result-analyser
Usage
use webignition\SfsResultAnalyser\Analyser; use webignition\SfsResultInterfaces\ResultInterface; // We're assuming that $result is a ResultInterface object. $analyser = new Analyser(); // Does a given result indicate that the entity is not to be trusted? $analyser->isUntrustworthy($result)); // returns true or false // Is a given result's entity trustworthy? // Return a float between 0 (do not trust) and 1 (probably can be trusted) $trustworthiness = $analyser->calculateTrustworthiness($result);
See Also
Use webignition/sfs-querier for a package that contains webignition/sfs-result-analyser, webignition/sfs-client and provides detailed usage instructions.