You are here

public function SiteAuditCheckBase::getScoreLabel in Site Audit 8.3

Get a human readable label for a score.

Return value

string Pass, Recommendation and so forth.

File

src/Plugin/SiteAuditCheckBase.php, line 121

Class

SiteAuditCheckBase
Base class for Site Audit Check plugins.

Namespace

Drupal\site_audit\Plugin

Code

public function getScoreLabel() {
  switch ($this->score) {
    case SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS:
      return $this
        ->t('Pass');
    case SiteAuditCheckBase::AUDIT_CHECK_SCORE_WARN:
      return $this
        ->t('Warning');
    case SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO:
      return $this
        ->t('Information');
    default:
      return $this
        ->t('Blocker');
  }
}