/**
  * Formats price with current currency settings
  *
  * @param $price
  * @param Currency $currency
  * @return string
  */
 public static function format($price, Currency $currency)
 {
     if ($currency->intl_formatting == 1) {
         return $currency->getFormatter()->asCurrency($price);
     } else {
         $number_value = $currency->getFormatter()->asDecimal($price);
         return strtr($currency->format_string, ['#' => $number_value]);
     }
 }