public function SecurityReviewSiteAuditCheckAbstract::calculateScore in Security Review 7
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- ./
security_review.site_audit.inc, line 115 - Contains \SiteAudit\Check\Security security_review checks.
Class
- SecurityReviewSiteAuditCheckAbstract
- Class SecurityReviewSiteAuditCheckAbstract
Code
public function calculateScore() {
$checks = security_review_get_checklist();
$checklist_results = security_review_run(array(
$this->module => array(
$checks[$this->module][$this->check],
),
));
$this->registry[$this->module][$this->check] = $checklist_results['security_review'][0];
if (!$this->registry[$this->module][$this->check]['result']) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}
else {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}
}