You are here

public function SiteAuditCheckCacheBackends::calculateScore in Site Audit 7

Implements \SiteAudit\Check\Abstract\calculateScore().

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/Cache/Backends.php, line 75
Contains \SiteAudit\Check\Cache\Backends.

Class

SiteAuditCheckCacheBackends
Class SiteAuditCheckCacheBackends.

Code

public function calculateScore() {
  $this->registry['cache_backends'] = variable_get('cache_backends', array());
  if (is_string($this->registry['cache_backends'])) {
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
  }
  if (is_array($this->registry['cache_backends']) && !empty($this->registry['cache_backends'])) {
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
  }
  return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
}