src/EventListener/AddFormatListener.php
private function getNotAcceptableHttpException(string $accept, array $mimeTypes = null): NotAcceptableHttpException
    {
        if (null === $mimeTypes) {
            $mimeTypes = array_keys($this->mimeTypes);
        }

        return new NotAcceptableHttpException(sprintf(
            'Requested format "%s" is not supported. Supported MIME types are "%s".',
            $accept,
            implode('", "', $mimeTypes)
        ));
    }
private function getNotAcceptableHttpException(string $accept, array $mimeTypes = null): NotAcceptableHttpException
    {
        if (null === $mimeTypes) {
            $mimeTypes = array_keys($this->mimeTypes);
        }

        return new NotAcceptableHttpException(sprintf(
            'Requested format "%s" is not supported. Supported MIME types are "%s".',
            $accept,
            implode('", "', $mimeTypes)
        ));
    }
private function getNotAcceptableHttpException ( string $ accept , array $ mimeTypes = null ) : NotAcceptableHttpException { if ( null === $ mimeTypes ) { $ mimeTypes = array_keys ( $ this -> mimeTypes ) ; } return new NotAcceptableHttpException ( sprintf ( 'Requested format "%s" is not supported. Supported MIME types are "%s".' , $ accept , implode ( '", "' , $ mimeTypes ) ) ) ; }
Retrieves an instance of NotAcceptableHttpException.

@param string[]|null $mimeTypes
Retrieves an instance of NotAcceptableHttpException .