Task/AnalyzeModule.php
public function getFileFunctions($file) {
    $code = file_get_contents($file);
    //drush_print($code);

    $matches = array();
    $pattern = "/^function (\w+)/m";
    preg_match_all($pattern, $code, $matches);

    return $matches[1];
  }
public function getFileFunctions($file) {
    $code = file_get_contents($file);
    //drush_print($code);

    $matches = array();
    $pattern = "/^function (\w+)/m";
    preg_match_all($pattern, $code, $matches);

    return $matches[1];
  }
public function getFileFunctions ( $ file ) { $ code = file_get_contents ( $ file ) ; //drush_print($code); $ matches = array ( ) ; $ pattern = "/^function (\w+)/m" ; preg_match_all ( $ pattern , $ code , $ matches ) ; return $ matches [ 1 ] ; }
Helper function to get all function names from a file.

@param $file
A complete filename from the Drupal root, eg 'modules/user/user.module'.
Helper function to get all function names from a file .