original_string: public function accepts($contentTypes)
      {
          $accepts = $this->getAcceptableContentTypes();
  
          if (count($accepts) === 0) {
              return true;
          }
  
          $types = (array) $contentTypes;
  
          foreach ($accepts as $accept) {
              if ($accept === '*/*' || $accept === '*') {
                  return true;
              }
  
              foreach ($types as $type) {
                  if ($this->matchesType($accept, $type) || $accept === strtok($type, '/').'/*') {
                      return true;
                  }
              }
          }
  
          return false;
      }
code: public function accepts($contentTypes)
      {
          $accepts = $this->getAcceptableContentTypes();
  
          if (count($accepts) === 0) {
              return true;
          }
  
          $types = (array) $contentTypes;
  
          foreach ($accepts as $accept) {
              if ($accept === '*/*' || $accept === '*') {
                  return true;
              }
  
              foreach ($types as $type) {
                  if ($this->matchesType($accept, $type) || $accept === strtok($type, '/').'/*') {
                      return true;
                  }
              }
          }
  
          return false;
      }
code_tokens: public function accepts ( $ contentTypes ) { $ accepts = $ this -> getAcceptableContentTypes ( ) ; if ( count ( $ accepts ) === 0 ) { return true ; } $ types = ( array ) $ contentTypes ; foreach ( $ accepts as $ accept ) { if ( $ accept === '*/*' || $ accept === '*' ) { return true ; } foreach ( $ types as $ type ) { if ( $ this -> matchesType ( $ accept , $ type ) || $ accept === strtok ( $ type , '/' ) . '/*' ) { return true ; } } } return false ; }
docstring: Determines whether the current requests accepts a given content type.
  
  @param  string|array  $contentTypes
  @return bool
docstring_tokens: Determines whether the current requests accepts a given content type .