You are here

public function SiteAuditCheckAbstract::getResult in Site Audit 7

Same name and namespace in other branches
  1. 8.2 Check/Abstract.php \SiteAuditCheckAbstract::getResult()

Determine the result message based on the score.

Return value

string Human readable message for a given status.

File

Check/Abstract.php, line 73
Contains \SiteAudit\Check\Abstract.

Class

SiteAuditCheckAbstract
Class SiteAuditCheckAbstract.

Code

public function getResult() {
  if ($this->optOut) {
    return dt('Opted-out in site configuration.');
  }
  switch ($this->score) {
    case SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS:
      return $this
        ->getResultPass();
    case SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN:
      return $this
        ->getResultWarn();
    case SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO:
      return $this
        ->getResultInfo();
    default:
      return $this
        ->getResultFail();
  }
}