You are here

public function SiteAuditCheckCachePageCompression::calculateScore in Site Audit 7

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

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/Cache/PageCompression.php, line 82
Contains \SiteAudit\Check\Cache\PageCompression.

Class

SiteAuditCheckCachePageCompression
Class SiteAuditCheckCachePageCompression.

Code

public function calculateScore() {
  global $conf;
  if (drush_get_option('vendor') == 'pantheon') {
    if (!$conf['page_compression']) {
      return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
    }
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
  }
  if (!$conf['page_compression']) {
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
  }
  return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}