public function SiteAuditCheckBestPracticesFolderStructure::calculateScore in Site Audit 8.2
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
BestPractices/ FolderStructure.php, line 80 - Contains \SiteAudit\Check\BestPractices\FolderStructure.
Class
- SiteAuditCheckBestPracticesFolderStructure
- Class SiteAuditCheckBestPracticesFolderStructure.
Code
public function calculateScore() {
$drupal_root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT');
$this->registry['contrib'] = is_dir($drupal_root . '/modules/contrib');
$this->registry['custom'] = is_dir($drupal_root . '/modules/custom');
if (!$this->registry['contrib'] || !$this->registry['custom']) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}