original_string: public function getMeta($file)
      {
          $content = file_get_contents($file);
  
          $matches = array();
          preg_match('~<!--(.*?)-->~msi', $content, $matches);
  
          if (empty($matches[1])) {
              return array();
          }
  
          $meta = json_decode(trim($matches[1]), true);
  
          if (!is_array($meta)) {
              return array();
          }
  
          $meta += array(
              'title' => '',
              'teaser' => '',
              'weight' => 0
          );
  
          return $meta;
      }
code: public function getMeta($file)
      {
          $content = file_get_contents($file);
  
          $matches = array();
          preg_match('~<!--(.*?)-->~msi', $content, $matches);
  
          if (empty($matches[1])) {
              return array();
          }
  
          $meta = json_decode(trim($matches[1]), true);
  
          if (!is_array($meta)) {
              return array();
          }
  
          $meta += array(
              'title' => '',
              'teaser' => '',
              'weight' => 0
          );
  
          return $meta;
      }
code_tokens: public function getMeta ( $ file ) { $ content = file_get_contents ( $ file ) ; $ matches = array ( ) ; preg_match ( '~<!--(.*?)-->~msi' , $ content , $ matches ) ; if ( empty ( $ matches [ 1 ] ) ) { return array ( ) ; } $ meta = json_decode ( trim ( $ matches [ 1 ] ) , true ) ; if ( ! is_array ( $ meta ) ) { return array ( ) ; } $ meta += array ( 'title' => '' , 'teaser' => '' , 'weight' => 0 ) ; return $ meta ; }
docstring: Extracts meta data from a help file
  @param string $file
  @return array
docstring_tokens: Extracts meta data from a help file