public static function compareTo(Version $left, Version $right)
    {
        switch (true) {
            case ($left->getMajor() < $right->getMajor()):
                return self::LESS_THAN;
            case ($left->getMajor() > $right->getMajor()):
                return self::GREATER_THAN;
            case ($left->getMinor() > $right->getMinor()):
                return self::GREATER_THAN;
            case ($left->getMinor() < $right->getMinor()):
                return self::LESS_THAN;
            case ($left->getPatch() > $right->getPatch()):
                return self::GREATER_THAN;
            case ($left->getPatch() < $right->getPatch()):
                return self::LESS_THAN;
            // @codeCoverageIgnoreStart
        }
        // @codeCoverageIgnoreEnd

        return self::compareIdentifiers(
            $left->getPreRelease(),
            $right->getPreRelease()
        );
    }