private function hasHigherPriority(
        ShopPaymentConfigRawValue $value1,
        ShopPaymentConfigRawValue $value2,
        $environment,
        $portalId
    ) {
        if ($this->hasHigherSourcePriority($value1, $value2)) {
            return true;
        }
        if ($this->hasHigherPortalPriority($value1, $value2, $portalId)) {
            return true;
        }
        if ($this->hasHigherEnvironmentPriority($value1, $value2, $environment)) {
            return true;
        }

        return false;
    }