public function SiteAuditCheckExtensionsRedundant::getResultFail in Site Audit 7
Implements \SiteAudit\Check\Abstract\getResultFail().
Overrides SiteAuditCheckAbstract::getResultFail
File
- Check/
Extensions/ Redundant.php, line 29 - Contains \SiteAudit\Check\Extensions\Redundant.
Class
- SiteAuditCheckExtensionsRedundant
- Class SiteAuditCheckExtensionsRedundant.
Code
public function getResultFail() {
$ret_val = dt('The following redundant modules(s) currently exist in your codebase: @list', array(
'@list' => implode(', ', array_keys($this->registry['extensions_redundant'])),
));
if (drush_get_option('detail')) {
if (drush_get_option('html')) {
$ret_val .= '<br/>';
$ret_val .= '<table class="table table-condensed">';
$ret_val .= '<thead><tr><th>' . dt('Name') . '</th><th>' . dt('Reason') . '</th></thead>';
$ret_val .= '<tbody>';
foreach ($this->registry['extensions_redundant'] as $row) {
$ret_val .= '<tr><td>' . implode('</td><td>', $row) . '</td></tr>';
}
$ret_val .= '</tbody>';
$ret_val .= '</table>';
}
else {
foreach ($this->registry['extensions_redundant'] as $row) {
$ret_val .= PHP_EOL;
if (!drush_get_option('json')) {
$ret_val .= str_repeat(' ', 6);
}
$ret_val .= '- ' . $row[0] . ': ' . $row[1];
}
}
}
return $ret_val;
}