original_string: public function getMetadata($key = null)
      {
          if (null === $key) {
              return stream_get_meta_data($this->resource);
          }
  
          $metadata = stream_get_meta_data($this->resource);
          if (! array_key_exists($key, $metadata)) {
              return;
          }
  
          return $metadata[$key];
      }
code: public function getMetadata($key = null)
      {
          if (null === $key) {
              return stream_get_meta_data($this->resource);
          }
  
          $metadata = stream_get_meta_data($this->resource);
          if (! array_key_exists($key, $metadata)) {
              return;
          }
  
          return $metadata[$key];
      }
code_tokens: public function getMetadata ( $ key = null ) { if ( null === $ key ) { return stream_get_meta_data ( $ this -> resource ) ; } $ metadata = stream_get_meta_data ( $ this -> resource ) ; if ( ! array_key_exists ( $ key , $ metadata ) ) { return ; } return $ metadata [ $ key ] ; }
docstring: Retrieve metadata from the underlying stream.
  
  @see http://php.net/stream_get_meta_data for a description of the expected output.
  
  @return array
docstring_tokens: Retrieve metadata from the underlying stream .