function _coder_50_callback in Coder 6.2
Same name and namespace in other branches
- 5.2 includes/coder_50.inc \_coder_50_callback()
- 5 includes/coder_50.inc \_coder_50_callback()
- 6 includes/coder_50.inc \_coder_50_callback()
Define the rule callbacks for 5.x, see do_coder_review_callback().
1 string reference to '_coder_50_callback'
- coder_50_reviews in includes/
coder_50.inc - Implementation of hook_reviews().
File
- includes/
coder_50.inc, line 90 - This include file implements coder functionality for 4.7 -> 5.x upgrades.
Code
function _coder_50_callback(&$coder_args, $review, $rule, $lines, &$results) {
// Only perform this check on module's (not includes).
$filename = $coder_args['#filename'];
if (drupal_substr($filename, -7) == '.module') {
// Make sure that a .info file exists.
$filename = drupal_substr(realpath($filename), 0, -7) . '.info';
if (!file_exists($filename)) {
$severity_name = _coder_severity_name($coder_args, $review, $rule);
_coder_error($results, $rule, $severity_name);
}
}
}