@@ -67,7 +67,7 @@ class Currency extends \Magento\Framework\Model\AbstractModel
67
67
protected $ _localeCurrency ;
68
68
69
69
/**
70
- * @var CurrencySystemConfig
70
+ * @var CurrencyConfig
71
71
*/
72
72
private $ currencyConfig ;
73
73
@@ -82,7 +82,7 @@ class Currency extends \Magento\Framework\Model\AbstractModel
82
82
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
83
83
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
84
84
* @param array $data
85
- * @param CurrencySystemConfig |null $currencyConfig
85
+ * @param CurrencyConfig |null $currencyConfig
86
86
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
87
87
*/
88
88
public function __construct (
@@ -96,7 +96,7 @@ public function __construct(
96
96
\Magento \Framework \Model \ResourceModel \AbstractResource $ resource = null ,
97
97
\Magento \Framework \Data \Collection \AbstractDb $ resourceCollection = null ,
98
98
array $ data = [],
99
- CurrencySystemConfig $ currencyConfig = null
99
+ CurrencyConfig $ currencyConfig = null
100
100
) {
101
101
parent ::__construct (
102
102
$ context ,
@@ -110,7 +110,7 @@ public function __construct(
110
110
$ this ->_directoryHelper = $ directoryHelper ;
111
111
$ this ->_currencyFilterFactory = $ currencyFilterFactory ;
112
112
$ this ->_localeCurrency = $ localeCurrency ;
113
- $ this ->currencyConfig = $ currencyConfig ?: ObjectManager::getInstance ()->get (CurrencySystemConfig ::class);
113
+ $ this ->currencyConfig = $ currencyConfig ?: ObjectManager::getInstance ()->get (CurrencyConfig ::class);
114
114
}
115
115
116
116
/**
@@ -356,8 +356,7 @@ public function getOutputFormat()
356
356
*/
357
357
public function getConfigAllowCurrencies ()
358
358
{
359
- $ allowedCurrencies = $ this ->_getResource ()->getConfigCurrencies ($ this , self ::XML_PATH_CURRENCY_ALLOW ) ?:
360
- $ this ->currencyConfig ->getConfigCurrencies (self ::XML_PATH_CURRENCY_ALLOW );
359
+ $ allowedCurrencies = $ this ->currencyConfig ->getConfigCurrencies (self ::XML_PATH_CURRENCY_ALLOW );
361
360
$ appBaseCurrencyCode = $ this ->_directoryHelper ->getBaseCurrencyCode ();
362
361
if (!in_array ($ appBaseCurrencyCode , $ allowedCurrencies )) {
363
362
$ allowedCurrencies [] = $ appBaseCurrencyCode ;
@@ -379,20 +378,15 @@ public function getConfigAllowCurrencies()
379
378
*/
380
379
public function getConfigDefaultCurrencies ()
381
380
{
382
- $ defaultCurrencies = $ this ->_getResource ()->getConfigCurrencies ($ this , self ::XML_PATH_CURRENCY_DEFAULT ) ?:
383
- $ this ->currencyConfig ->getConfigCurrencies (self ::XML_PATH_CURRENCY_DEFAULT );
384
-
385
- return $ defaultCurrencies ;
381
+ return $ this ->currencyConfig ->getConfigCurrencies (self ::XML_PATH_CURRENCY_DEFAULT );
386
382
}
387
383
388
384
/**
389
385
* @return array
390
386
*/
391
387
public function getConfigBaseCurrencies ()
392
388
{
393
- $ defaultCurrencies = $ this ->_getResource ()->getConfigCurrencies ($ this , self ::XML_PATH_CURRENCY_BASE ) ?:
394
- $ this ->currencyConfig ->getConfigCurrencies (self ::XML_PATH_CURRENCY_BASE );
395
- return $ defaultCurrencies ;
389
+ return $ this ->currencyConfig ->getConfigCurrencies (self ::XML_PATH_CURRENCY_BASE );
396
390
}
397
391
398
392
/**
0 commit comments