highestRate example

foreach ($this->getIterator() as $price) {
            $taxes->merge($price->getCalculatedTaxes());
        }

        return $taxes;
    }

    public function getHighestTaxRule(): TaxRuleCollection
    {
        $rules = new TaxRuleCollection();

        $highestRate = $this->getTaxRules()->highestRate();

        if ($highestRate !== null) {
            $rules->add(new TaxRule($highestRate->getTaxRate(), 100));
        }

        return $rules;
    }

    public function merge(self $prices): self
    {
        return new self(array_merge($this->elements, $prices->getElements()));
    }
Home | Imprint | This part of the site doesn't use cookies.