static public function getTargetsForSale(SaleInterface $sale)
    {
        if ($sale instanceof CartInterface) {
            return [static::TARGET_ORDER, static::TARGET_QUOTE];
        } elseif ($sale instanceof OrderInterface) {
            if ($sale->getState() !== OrderStates::STATE_NEW) {
                return [];
            }
            return [static::TARGET_QUOTE];
        } elseif ($sale instanceof QuoteInterface) {
            return [static::TARGET_ORDER];
        }

        throw new InvalidArgumentException("Unexpected sale type.");
    }
static public function getTargetsForSale(SaleInterface $sale)
    {
        if ($sale instanceof CartInterface) {
            return [static::TARGET_ORDER, static::TARGET_QUOTE];
        } elseif ($sale instanceof OrderInterface) {
            if ($sale->getState() !== OrderStates::STATE_NEW) {
                return [];
            }
            return [static::TARGET_QUOTE];
        } elseif ($sale instanceof QuoteInterface) {
            return [static::TARGET_ORDER];
        }

        throw new InvalidArgumentException("Unexpected sale type.");
    }
Returns the available targets for the given sale.

@param SaleInterface $sale

@return array