public function SiteAuditCheckBestPracticesSettings::calculateScore in Site Audit 8.2
Same name and namespace in other branches
- 7 Check/BestPractices/Settings.php \SiteAuditCheckBestPracticesSettings::calculateScore()
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
BestPractices/ Settings.php, line 65 - 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;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}