public function formatCurrency($price) { if (is_array($price)) { $price = new Price($price[0], $price[1]); } $amount = $price->getAmount(); $currency = $price->getCurrency(); return $this->numberFormatter->formatCurrency($amount, $currency); }