/** * Calculate tax details for quote item with given quantity * * @param QuoteDetailsItemInterface $item * @param int $quantity * @param bool $round * @return TaxDetailsItemInterface */ public function calculate(QuoteDetailsItemInterface $item, $quantity, $round = true) { if ($item->getIsTaxIncluded()) { return $this->calculateWithTaxInPrice($item, $quantity, $round); } else { return $this->calculateWithTaxNotInPrice($item, $quantity, $round); } }