You are here

function _coder_warning in Coder 6

Same name and namespace in other branches
  1. 6.2 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 1745
Developer Module that assists with code review and version upgrade that supports a plug-in extensible hook system so contributed modules can define additional review standards.

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