protected static function sortPluralizedCompare($a, $b)
    {
        if ($a == $b) {
            return 0;
        }

        $rangeA = explode(':', $a);
        $rangeB = explode(':', $b);

        // Both range starts provided.
        if (isset($rangeA[0]) && isset($rangeB[0])) {
            return strcmp($rangeA[0], $rangeB[0]);
        }

        // Only second range has a starting point.
        if (!isset($rangeA[0]) && isset($rangeB[0])) {
            return -1;
        }

        // Only first range has a starting point.
        if (isset($rangeA[0]) && !isset($rangeB[0])) {
            return 1;
        }

        // Both are an open start range.
        if (isset($rangeA[1]) && isset($rangeB[1])) {
            return strcmp($rangeA[1], $rangeB[1]);
        }

        // Only second range is open => First is first.
        if (!isset($rangeA[1]) && isset($rangeB[1])) {
            return 1;
        }

        // Only first range is open => Second is first.
        if (isset($rangeA[1]) && !isset($rangeB[1])) {
            return -1;
        }

        // Just here to make the IDEs happy - is already handled above as early exit point.
        return 0;
    }