You are here

public function SiteAuditCheckBestPracticesServices::calculateScore in Site Audit 8.2

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

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/BestPractices/Services.php, line 67
Contains \SiteAudit\Check\BestPractices\Service.

Class

SiteAuditCheckBestPracticesServices
Class SiteAuditCheckBestPracticesServices.

Code

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