public function SiteAuditCheckCachePreprocessJs::calculateScore in Site Audit 8.2
Same name and namespace in other branches
- 7 Check/Cache/PreprocessJs.php \SiteAuditCheckCachePreprocessJs::calculateScore()
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
Cache/ PreprocessJs.php, line 64 - Contains \SiteAudit\Check\Cache\PreprocessJs.
Class
- SiteAuditCheckCachePreprocessJs
- Class SiteAuditCheckCachePreprocessJs.
Code
public function calculateScore() {
$config = \Drupal::config('system.performance')
->get('js.preprocess');
if ($config) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}
if (site_audit_env_is_dev()) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}