You are here

function coder_reviews in Coder 6

Same name and namespace in other branches
  1. 5.2 coder.module \coder_reviews()
  2. 5 coder.module \coder_reviews()
  3. 6.2 coder.module \coder_reviews()

Implementation of hook_reviews().

1 call to coder_reviews()
coder_test in ./coder.module
Helper function to run the review on the code snippet.
2 string references to 'coder_reviews'
coder_uninstall in ./coder.install
_coder_get_default_settings in ./coder.module
Returns a active settings array for coder.

File

./coder.module, line 52
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_reviews() {
  global $_coder_reviews;
  if (!isset($_coder_reviews)) {
    $_coder_reviews = array();
    $path = drupal_get_path('module', 'coder') . '/includes';
    $files = drupal_system_listing('coder_.*\\.inc$', $path, 'filename', 0);
    foreach ($files as $file) {
      require_once './' . $file->filename;
      $function = $file->name . '_reviews';
      if (function_exists($function)) {
        if ($review = call_user_func($function)) {
          $_coder_reviews = array_merge($_coder_reviews, $review);
        }
      }
    }
  }
  return $_coder_reviews;
}