PHP code example of webignition / sfs-result-analyser
1. Go to this page and download the library: Download webignition/sfs-result-analyser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webignition / sfs-result-analyser example snippets
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);