src/Parser/TypeFixer.php
private function commaSeparatedTypeFix(): ?string
    {
        if ($this->position === 0) {
            return null;
        }

        $separatorComparator = substr($this->inputString, $this->position - 1, 2);
        if ($separatorComparator !== self::COMMA_SEPARATED_TYPE_SEPARATOR) {
            return null;
        }

        $possibleTypeSubtypes = array(
            substr($this->inputString, 0, $this->position - 1),
            substr($this->inputString, $this->position + 1)
        );

        $typeSubtypes = array();

        foreach ($possibleTypeSubtypes as $possibleTypeSubtype) {
            $typeSubtype = $this->getTypeSubtypeFromPossibleTypeSubtype($possibleTypeSubtype);

            if (!in_array($typeSubtype, $typeSubtypes) && !is_null($typeSubtype)) {
                $typeSubtypes[] = $typeSubtype;
            }
        }

        return $this->getLongestString($typeSubtypes);
    }
private function commaSeparatedTypeFix(): ?string
    {
        if ($this->position === 0) {
            return null;
        }

        $separatorComparator = substr($this->inputString, $this->position - 1, 2);
        if ($separatorComparator !== self::COMMA_SEPARATED_TYPE_SEPARATOR) {
            return null;
        }

        $possibleTypeSubtypes = array(
            substr($this->inputString, 0, $this->position - 1),
            substr($this->inputString, $this->position + 1)
        );

        $typeSubtypes = array();

        foreach ($possibleTypeSubtypes as $possibleTypeSubtype) {
            $typeSubtype = $this->getTypeSubtypeFromPossibleTypeSubtype($possibleTypeSubtype);

            if (!in_array($typeSubtype, $typeSubtypes) && !is_null($typeSubtype)) {
                $typeSubtypes[] = $typeSubtype;
            }
        }

        return $this->getLongestString($typeSubtypes);
    }
Attempt to fix media types that are formatted as:

type/subtype, type/subtype

i.e. two media types comma-separated together

If of this type, go for the longest valid option