original_string: public static function matchesType($actual, $type)
      {
          if ($actual === $type) {
              return true;
          }
  
          $split = explode('/', $actual);
  
          return isset($split[1]) && preg_match('#'.preg_quote($split[0], '#').'/.+\+'.preg_quote($split[1], '#').'#', $type);
      }
code: public static function matchesType($actual, $type)
      {
          if ($actual === $type) {
              return true;
          }
  
          $split = explode('/', $actual);
  
          return isset($split[1]) && preg_match('#'.preg_quote($split[0], '#').'/.+\+'.preg_quote($split[1], '#').'#', $type);
      }
code_tokens: public static function matchesType ( $ actual , $ type ) { if ( $ actual === $ type ) { return true ; } $ split = explode ( '/' , $ actual ) ; return isset ( $ split [ 1 ] ) && preg_match ( '#' . preg_quote ( $ split [ 0 ] , '#' ) . '/.+\+' . preg_quote ( $ split [ 1 ] , '#' ) . '#' , $ type ) ; }
docstring: Determine if the given content types match.
  
  @param  string  $actual
  @param  string  $type
  @return bool
docstring_tokens: Determine if the given content types match .