public function SiteAuditCheckCodebaseSizeAll::calculateScore in Site Audit 7
Same name and namespace in other branches
- 8.2 Check/Codebase/SizeAll.php \SiteAuditCheckCodebaseSizeAll::calculateScore()
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
Codebase/ SizeAll.php, line 65 - Contains \SiteAudit\Check\Codebase\SizeAll.
Class
- SiteAuditCheckCodebaseSizeAll
- Class SiteAuditCheckCodebaseSizeAll.
Code
public function calculateScore() {
$drupal_root = drush_get_context('DRUSH_SELECTED_DRUPAL_ROOT');
exec('du -s -k -x ' . $drupal_root, $result);
$this->registry['size_all_kb'] = trim($result[0]);
if (!$this->registry['size_all_kb']) {
$this->abort = TRUE;
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
}