original_string: public function scan($directory = GC_DIR_MODULE)
      {
          $modules = array();
  
          foreach (scandir($directory) as $module_id) {
  
              if (!$this->isValidId($module_id)) {
                  continue;
              }
  
              $info = $this->getInfo($module_id);
  
              if (!isset($info['core'])) {
                  continue;
              }
  
              $modules[$module_id] = $info;
          }
  
          return $modules;
      }
code: public function scan($directory = GC_DIR_MODULE)
      {
          $modules = array();
  
          foreach (scandir($directory) as $module_id) {
  
              if (!$this->isValidId($module_id)) {
                  continue;
              }
  
              $info = $this->getInfo($module_id);
  
              if (!isset($info['core'])) {
                  continue;
              }
  
              $modules[$module_id] = $info;
          }
  
          return $modules;
      }
code_tokens: public function scan ( $ directory = GC_DIR_MODULE ) { $ modules = array ( ) ; foreach ( scandir ( $ directory ) as $ module_id ) { if ( ! $ this -> isValidId ( $ module_id ) ) { continue ; } $ info = $ this -> getInfo ( $ module_id ) ; if ( ! isset ( $ info [ 'core' ] ) ) { continue ; } $ modules [ $ module_id ] = $ info ; } return $ modules ; }
docstring: Returns an array of scanned module IDs
  @param string $directory
  @return array
docstring_tokens: Returns an array of scanned module IDs