protected function formatCurrency($currency) { if (!isset($this->currencyCodes[$currency])) { throw new UnknownCurrencyCode(sprintf('%s is unknown currency.', $currency)); } return $this->currencyCodes[$currency]; }