private function filterMimeType(string $mimetype): string
    {
        if ('' == $mimetype) {
            return static::DEFAULT_MIMETYPE;
        }

        if (1 === preg_match(static::REGEXP_MIMETYPE, $mimetype)) {
            return $mimetype;
        }

        throw new SyntaxError(sprintf('invalid mimeType, `%s`', $mimetype));
    }
private function filterMimeType(string $mimetype): string
    {
        if ('' == $mimetype) {
            return static::DEFAULT_MIMETYPE;
        }

        if (1 === preg_match(static::REGEXP_MIMETYPE, $mimetype)) {
            return $mimetype;
        }

        throw new SyntaxError(sprintf('invalid mimeType, `%s`', $mimetype));
    }
private function filterMimeType ( string $ mimetype ) : string { if ( '' == $ mimetype ) { return static :: DEFAULT_MIMETYPE ; } if ( 1 === preg_match ( static :: REGEXP_MIMETYPE , $ mimetype ) ) { return $ mimetype ; } throw new SyntaxError ( sprintf ( 'invalid mimeType, `%s`' , $ mimetype ) ) ; }
Filter the mimeType property.

@throws SyntaxError If the mimetype is invalid
Filter the mimeType property .