private function getCurrencyCode($currency) { $list = self::getCurrencyList(); if (isset($list[$currency])) { return $list[$currency]['code']; } throw new \RuntimeException('Invalid exception provided'); }