You are here

function coder_reviews in Coder 5.2

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

Implementation of hook_reviews().

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 47
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;
}