function _coder_style_callback in Coder 6
Same name and namespace in other branches
- 5.2 includes/coder_style.inc \_coder_style_callback()
- 5 includes/coder_style.inc \_coder_style_callback()
Define the rule callbacks for style.
1 string reference to '_coder_style_callback'
- coder_style_reviews in includes/
coder_style.inc - Implementation of hook_reviews().
File
- includes/
coder_style.inc, line 161 - This include file implements coder functionality for Drupal Standards.
Code
function _coder_style_callback(&$coder_args, $review, $rule, $lines, &$results) {
for ($lineno = -1; $last = array_slice($lines, $lineno); $lineno--) {
$lastline = $last[0];
if (preg_match('/\\S/', $lastline)) {
break;
}
}
if ($last && $lastline && preg_match('/\\?>\\s*$/i', $lastline)) {
$severity_name = _coder_severity_name($coder_args, $review, $rule);
_coder_error($results, $rule, $severity_name, count($lines));
}
}