You are here

public function SiteAuditCheckBestPracticesFast404::calculateScore in Site Audit 8.2

Same name and namespace in other branches
  1. 7 Check/BestPractices/Fast404.php \SiteAuditCheckBestPracticesFast404::calculateScore()

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

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/BestPractices/Fast404.php, line 62
Contains \SiteAudit\Check\BestPractices\Fast404.

Class

SiteAuditCheckBestPracticesFast404
Class SiteAuditCheckBestPracticesFast404.

Code

public function calculateScore() {
  $config = \Drupal::config('system.performance');
  if ($config
    ->get('fast_404.enabled') && trim($config
    ->get('fast_404.paths')) != '') {
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
  }
  return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}