/** * @param XMLWriter $xmlWriter * @param Invoice $invoice */ protected function addTotal(XMLWriter $xmlWriter, Invoice $invoice) { $xmlWriter->writeElement('total', $this->currencyFormatter->formatCurrency($invoice->getTotalAmount(), $invoice->getCurrencyCode())); }