You are here

function theme_drush_coder_review in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_review/coder_review.drush.inc \theme_drush_coder_review()

Returns the results and filenames of a review in a format for drush use.

Parameters

array $variables: An associative array with the following keys:

  • name:
  • filename:
  • results:
2 calls to theme_drush_coder_review()
_coder_review_form_output in coder_review/coder_review.module
???
_coder_review_page_form_includes in coder_review/coder_review.module
Adds results to form definition for display on the coder review page.

File

coder_review/coder_review.drush.inc, line 595
Command line utility support for Coder_review module.

Code

function theme_drush_coder_review(array $variables) {
  $name = $variables['name'];
  $filename = $variables['filename'];
  $results = $variables['results'];
  $no_empty = _coder_review_drush_get_option_no('empty');
  if (!drush_get_option('summary') && !empty($results) && (empty($results[0]) || $results[0] != _t('No Problems Found') || !$no_empty)) {
    if (drush_get_option('checkstyle') || drush_get_option('xml')) {
      _coder_review_drush_xml_output_results($filename, $results);
    }
    else {
      _coder_review_drush_print($filename . ":\n " . implode("\n ", $results) . "\n");
    }
  }
}