You are here

function _coder_warning in Coder 6.2

Same name and namespace in other branches
  1. 6 coder.module \_coder_warning()

Return the formatted warning message from the $rule.

1 call to _coder_warning()
theme_coder_warning_msg in ./coder.module
Format a coder warning to be included in results, creating the text.

File

./coder.module, line 1980

Code

function _coder_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']);
}