public function SiteAuditCheckBestPracticesSettings::calculateScore in Site Audit 7
Same name and namespace in other branches
- 8.2 Check/BestPractices/Settings.php \SiteAuditCheckBestPracticesSettings::calculateScore()
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
BestPractices/ Settings.php, line 69 - Contains \SiteAudit\Check\BestPractices\Settings.
Class
- SiteAuditCheckBestPracticesSettings
- Class SiteAuditCheckBestPracticesSettings.
Code
public function calculateScore() {
$drupal_root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT');
if (file_exists($drupal_root . '/sites/default/settings.php')) {
if (is_link($drupal_root . '/sites/default/settings.php')) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}
if (isset($this->registry['multisites']) && !empty($this->registry['multisites'])) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}