You are here

public function SiteAuditCheckBestPracticesSitesDefault::calculateScore in Site Audit 8.2

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

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

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/BestPractices/SitesDefault.php, line 67
Contains \SiteAudit\Check\BestPractices\SitesDefault.

Class

SiteAuditCheckBestPracticesSitesDefault
Class SiteAuditCheckBestPracticesSitesDefault.

Code

public function calculateScore() {
  $drupal_root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT');
  if (is_dir($drupal_root . '/sites/default')) {
    if (is_link($drupal_root . '/sites/default')) {
      return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
    }
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
  }
  return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}