function _coder_50_callback in Coder 5.2
Same name and namespace in other branches
- 5 includes/coder_50.inc \_coder_50_callback()
- 6.2 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 89 - 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 (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);
$warning = t('All modules now need to have a <a href="@info">modulename.info file</a>', array(
'@info' => 'http://drupal.org/node/101009',
));
$results[0] = theme('coder_warning', $warning, $severity_name);
}
}
}