You are here

function _coder_review_warning in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_review/coder_review.common.inc \_coder_review_warning()

Return the formatted warning message from the $rule.

2 calls to _coder_review_warning()
do_coder_reviews in coder_review/coder_review.module
Perform batch coder reviews for multiple files.
theme_coder_review_warning_msg in coder_review/coder_review.module
Format a coder_review warning to be included in results, creating the text.

File

coder_review/coder_review.module, line 2100

Code

function _coder_review_warning($rule) {
  if (isset($rule['#warning_callback'])) {
    if (function_exists($rule['#warning_callback'])) {
      return $rule['#warning_callback']();
    }
    return t('please <a href="@report">report</a> this !warning', array(
      '@report' => 'http://drupal.org/node/add/project_issue/coder/bug',
      '!warning' => $rule['#warning_callback'],
    ));
  }
  return t($rule['#warning']);
}