You are here

public function SiteAuditCheckBestPracticesSitesAll::calculateScore in Site Audit 7

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

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/BestPractices/SitesAll.php, line 67
Contains \SiteAudit\Check\BestPractices\Settings.

Class

SiteAuditCheckBestPracticesSitesAll
Class SiteAuditCheckBestPracticesSitesAll.

Code

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