Code Duplication    Length = 5-6 lines in 2 locations

core/helpers/EEH_Template.helper.php 1 location

@@ 463-468 (lines=6) @@
460
            // was a country ISO code passed ? if so generate currency config object for that country
461
            $mny = $CNT_ISO !== '' ? new EE_Currency_Config($CNT_ISO) : null;
462
            // verify results
463
            if ( ! $mny instanceof EE_Currency_Config) {
464
                // set default config country currency settings
465
                $mny = EE_Registry::instance()->CFG->currency instanceof EE_Currency_Config
466
                    ? EE_Registry::instance()->CFG->currency
467
                    : new EE_Currency_Config();
468
            }
469
            // format float
470
            $amount_formatted = number_format($amount, $mny->dec_plc, $mny->dec_mrk, $mny->thsnds);
471
            // add formatting ?

core/helpers/EEH_Money.helper.php 1 location

@@ 221-225 (lines=5) @@
218
            ? new EE_Currency_Config($CNT_ISO)
219
            : null;
220
        //default currency settings for site if not set
221
        if (! $currency_config instanceof EE_Currency_Config) {
222
            $currency_config = EE_Registry::instance()->CFG->currency instanceof EE_Currency_Config
223
                ? EE_Registry::instance()->CFG->currency
224
                : new EE_Currency_Config();
225
        }
226
        return $currency_config;
227
    }
228
} //end class EEH_Money