Skip to content

Commit 13f1ae1

Browse files
author
Yu Tang
committed
Merge branch 'FearlessKiwis-MAGETWO-30415-framework-app-dependency' into develop
2 parents 9c7786c + b7cde02 commit 13f1ae1

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

app/code/Magento/Directory/Model/PriceCurrency.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,12 @@ public function convert($amount, $scope = null, $currency = null)
5858
}
5959

6060
/**
61-
* Convert and round price value for specified store or passed currency
62-
*
63-
* @param float $amount
64-
* @param null|string|bool|int|\Magento\Store\Model\Store $store
65-
* @param Currency|string|null $currency
66-
* @param int $precision
67-
* @return float
61+
* {@inheritdoc}
6862
*/
69-
public function convertAndRound($amount, $store = null, $currency = null, $precision = self::DEFAULT_PRECISION)
63+
public function convertAndRound($amount, $scope = null, $currency = null, $precision = self::DEFAULT_PRECISION)
7064
{
71-
$currentCurrency = $this->getCurrency($store, $currency);
72-
$convertedValue = $this->getStore($store)->getBaseCurrency()->convert($amount, $currentCurrency);
65+
$currentCurrency = $this->getCurrency($scope, $currency);
66+
$convertedValue = $this->getStore($scope)->getBaseCurrency()->convert($amount, $currentCurrency);
7367
return round($convertedValue, $precision);
7468
}
7569

lib/internal/Magento/Framework/Pricing/PriceCurrencyInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ public function convert($amount, $scope = null, $currency = null);
3030
* Convert and round price value
3131
*
3232
* @param float $amount
33-
* @param null|string|bool|int|\Magento\Store\Model\Store $store
34-
* @param \Magento\Directory\Model\Currency|string|null $currency
33+
* @param null|string|bool|int|\Magento\Framework\App\ScopeInterface $scope
34+
* @param \Magento\Framework\Model\AbstractModel|string|null $currency
3535
* @param int $precision
3636
* @return float
3737
*/
38-
public function convertAndRound($amount, $store = null, $currency = null, $precision = self::DEFAULT_PRECISION);
38+
public function convertAndRound($amount, $scope = null, $currency = null, $precision = self::DEFAULT_PRECISION);
3939

4040
/**
4141
* Format price value

0 commit comments

Comments
 (0)