You are here

public function SiteAuditCheckCodebasePhpMessDetection::getAction in Site Audit 8.2

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

Overrides SiteAuditCheckAbstract::getAction

File

Check/Codebase/PhpMessDetection.php, line 105
Contains \SiteAudit\Check\Codebase\PhpMessDetection.

Class

SiteAuditCheckCodebasePhpMessDetection
Class SiteAuditCheckCodebasePhpMessDetection.

Code

public function getAction() {
  if (isset($this->registry['phpmd_path_error'])) {
    return dt('Run "composer install" from the site_audit installation root to install missing dependencies.');
  }
  if (isset($this->registry['custom_code'])) {
    return dt('Use the --custom-code option.');
  }
  if ($this
    ->getScore() == SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN) {
    return dt('Fix the PHP Mess Detector violations.');
  }
}