original_string: private function get_moodle_path_metadata($path) {
          // Add module metadata is stored in frankenstyle_modname/yui/src/yui_modname/meta/yui_modname.json.
          $baseyui = $path . '/yui/src';
          $modules = array();
          if (is_dir($baseyui)) {
              $items = new DirectoryIterator($baseyui);
              foreach ($items as $item) {
                  if ($item->isDot() or !$item->isDir()) {
                      continue;
                  }
                  $metafile = realpath($baseyui . '/' . $item . '/meta/' . $item . '.json');
                  if (!is_readable($metafile)) {
                      continue;
                  }
                  $metadata = file_get_contents($metafile);
                  $modules = array_merge($modules, (array) json_decode($metadata));
              }
          }
          return $modules;
      }
code: private function get_moodle_path_metadata($path) {
          // Add module metadata is stored in frankenstyle_modname/yui/src/yui_modname/meta/yui_modname.json.
          $baseyui = $path . '/yui/src';
          $modules = array();
          if (is_dir($baseyui)) {
              $items = new DirectoryIterator($baseyui);
              foreach ($items as $item) {
                  if ($item->isDot() or !$item->isDir()) {
                      continue;
                  }
                  $metafile = realpath($baseyui . '/' . $item . '/meta/' . $item . '.json');
                  if (!is_readable($metafile)) {
                      continue;
                  }
                  $metadata = file_get_contents($metafile);
                  $modules = array_merge($modules, (array) json_decode($metadata));
              }
          }
          return $modules;
      }
code_tokens: private function get_moodle_path_metadata ( $ path ) { // Add module metadata is stored in frankenstyle_modname/yui/src/yui_modname/meta/yui_modname.json. $ baseyui = $ path . '/yui/src' ; $ modules = array ( ) ; if ( is_dir ( $ baseyui ) ) { $ items = new DirectoryIterator ( $ baseyui ) ; foreach ( $ items as $ item ) { if ( $ item -> isDot ( ) or ! $ item -> isDir ( ) ) { continue ; } $ metafile = realpath ( $ baseyui . '/' . $ item . '/meta/' . $ item . '.json' ) ; if ( ! is_readable ( $ metafile ) ) { continue ; } $ metadata = file_get_contents ( $ metafile ) ; $ modules = array_merge ( $ modules , ( array ) json_decode ( $ metadata ) ) ; } } return $ modules ; }
docstring: Helper function process and return the YUI metadata for all of the modules under the specified path.
  
  @param String $path the UNC path to the YUI src directory.
  @return Array the complete array for frankenstyle directory.
docstring_tokens: Helper function process and return the YUI metadata for all of the modules under the specified path .