original_string: public function guess($path)
      {
          if (!is_file($path)) {
              throw new FileNotFoundException($path);
          }
  
          if (!is_readable($path)) {
              throw new AccessDeniedException($path);
          }
  
          foreach ($this->guessers as $guesser) {
              if (null !== $mimeType = $guesser->guess($path)) {
                  return $mimeType;
              }
          }
  
          if (2 === \count($this->guessers) && !FileBinaryMimeTypeGuesser::isSupported() && !FileinfoMimeTypeGuesser::isSupported()) {
              throw new \LogicException('Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)');
          }
      }
code: public function guess($path)
      {
          if (!is_file($path)) {
              throw new FileNotFoundException($path);
          }
  
          if (!is_readable($path)) {
              throw new AccessDeniedException($path);
          }
  
          foreach ($this->guessers as $guesser) {
              if (null !== $mimeType = $guesser->guess($path)) {
                  return $mimeType;
              }
          }
  
          if (2 === \count($this->guessers) && !FileBinaryMimeTypeGuesser::isSupported() && !FileinfoMimeTypeGuesser::isSupported()) {
              throw new \LogicException('Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)');
          }
      }
code_tokens: public function guess ( $ path ) { if ( ! is_file ( $ path ) ) { throw new FileNotFoundException ( $ path ) ; } if ( ! is_readable ( $ path ) ) { throw new AccessDeniedException ( $ path ) ; } foreach ( $ this -> guessers as $ guesser ) { if ( null !== $ mimeType = $ guesser -> guess ( $ path ) ) { return $ mimeType ; } } if ( 2 === \ count ( $ this -> guessers ) && ! FileBinaryMimeTypeGuesser :: isSupported ( ) && ! FileinfoMimeTypeGuesser :: isSupported ( ) ) { throw new \ LogicException ( 'Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)' ) ; } }
docstring: Tries to guess the mime type of the given file.
  
  The file is passed to each registered mime type guesser in reverse order
  of their registration (last registered is queried first). Once a guesser
  returns a value that is not NULL, this method terminates and returns the
  value.
  
  @param string $path The path to the file
  
  @return string The mime type or NULL, if none could be guessed
  
  @throws \LogicException
  @throws FileNotFoundException
  @throws AccessDeniedException
docstring_tokens: Tries to guess the mime type of the given file .