Code Duplication    Length = 13-13 lines in 2 locations

catalog/includes/apps/braintree/OSCOM_Braintree.php 1 location

@@ 562-574 (lines=13) @@
559
      }
560
    }
561
562
    function formatCurrencyRaw($total, $currency_code = null, $currency_value = null) {
563
      global $currencies, $currency;
564
565
      if ( !isset($currency_code) ) {
566
        $currency_code = tep_session_is_registered('currency') ? $currency : DEFAULT_CURRENCY;
567
      }
568
569
      if ( !isset($currency_value) || !is_numeric($currency_value) ) {
570
        $currency_value = $currencies->currencies[$currency_code]['value'];
571
      }
572
573
      return number_format(tep_round($total * $currency_value, $currencies->currencies[$currency_code]['decimal_places']), $currencies->currencies[$currency_code]['decimal_places'], '.', '');
574
    }
575
576
    function getCode() {
577
      return $this->_code;

catalog/includes/apps/paypal/OSCOM_PayPal.php 1 location

@@ 614-626 (lines=13) @@
611
      tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key = '" . tep_db_input($key) . "'");
612
    }
613
614
    function formatCurrencyRaw($total, $currency_code = null, $currency_value = null) {
615
      global $currencies, $currency;
616
617
      if ( !isset($currency_code) ) {
618
        $currency_code = tep_session_is_registered('currency') ? $currency : DEFAULT_CURRENCY;
619
      }
620
621
      if ( !isset($currency_value) || !is_numeric($currency_value) ) {
622
        $currency_value = $currencies->currencies[$currency_code]['value'];
623
      }
624
625
      return number_format(tep_round($total * $currency_value, $currencies->currencies[$currency_code]['decimal_places']), $currencies->currencies[$currency_code]['decimal_places'], '.', '');
626
    }
627
628
    function getCode() {
629
      return $this->_code;