src/Parser/FieldParser.php
private function validateBundleMimeVariant(array $bundle)
    {
        if (count($bundle) < 3                          // Too few items in bundle
            || Tokens::MIME_SEPARATOR !== $bundle[1]    // Invalid separator
            || Tokens::isSeparator($bundle[0], true)    // Invalid type
            || Tokens::isSeparator($bundle[2], true)    // Invalid subtype
        ) {
            throw new InvalidVariantException(
                '"' . implode('', $bundle) . '" is not a valid mime type'
            );
        }
    }
private function validateBundleMimeVariant(array $bundle)
    {
        if (count($bundle) < 3                          // Too few items in bundle
            || Tokens::MIME_SEPARATOR !== $bundle[1]    // Invalid separator
            || Tokens::isSeparator($bundle[0], true)    // Invalid type
            || Tokens::isSeparator($bundle[2], true)    // Invalid subtype
        ) {
            throw new InvalidVariantException(
                '"' . implode('', $bundle) . '" is not a valid mime type'
            );
        }
    }
private function validateBundleMimeVariant ( array $ bundle ) { if ( count ( $ bundle ) < 3 // Too few items in bundle || Tokens :: MIME_SEPARATOR !== $ bundle [ 1 ] // Invalid separator || Tokens :: isSeparator ( $ bundle [ 0 ] , true ) // Invalid type || Tokens :: isSeparator ( $ bundle [ 2 ] , true ) // Invalid subtype ) { throw new InvalidVariantException ( '"' . implode ( '' , $ bundle ) . '" is not a valid mime type' ) ; } }
Checks to see if the bundle is valid for a mime type, if an anomaly is detected then an exception is thrown.

@throws InvalidVariantException

@param array<string> $bundle
Checks to see if the bundle is valid for a mime type if an anomaly is detected then an exception is thrown .