From a793b17ec08ca798092c1d52746fa47eaa99560d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=A4fer?= Date: Thu, 26 Jan 2023 07:31:45 +0100 Subject: [PATCH] Remove unneeded code After the latest releases, these code parts seem to be not needed anymore and could be removed in my eyes. --- Helper/Data.php | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/Helper/Data.php b/Helper/Data.php index 1454e92..3313739 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -14,7 +14,6 @@ use Magento\Framework\App\State as AppState; use Magento\Framework\App\Helper\AbstractHelper; use Magento\Framework\App\Helper\Context; -use Magento\Framework\Pricing\Helper\Data as MagentoCurrencyHelper; use Wallee\Sdk\Model\CriteriaOperator; use Wallee\Sdk\Model\EntityQueryFilter; use Wallee\Sdk\Model\EntityQueryFilterType; @@ -33,23 +32,15 @@ class Data extends AbstractHelper */ private $appState; - /** - * - * @var MagentoCurrencyHelper - */ - private $magentoCurrencyHelper; - /** * * @param Context $context * @param AppState $appState - * @param MagentoCurrencyHelper $magentoCurrencyHelper */ - public function __construct(Context $context, AppState $appState, MagentoCurrencyHelper $magentoCurrencyHelper) + public function __construct(Context $context, AppState $appState) { parent::__construct($context); $this->appState = $appState; - $this->magentoCurrencyHelper = $magentoCurrencyHelper; } /** @@ -62,22 +53,6 @@ public function isAdminArea() return $this->appState->getAreaCode() == AppArea::AREA_ADMINHTML; } - /** - * Gets the fraction digits of the given currency. - * - * @param string $currencyCode - * @return float - */ - public function getCurrencyFractionDigits($currencyCode) - { - $currency = $this->currencyProvider->find($currencyCode); - if ($currency) { - return $currency->getFractionDigits(); - } else { - return 2; - } - } - /** * Rounds the given amount to the currency's format. * @@ -214,4 +189,4 @@ public function generateUUID() { $data[8] = \chr(\ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 return \vsprintf('%s%s-%s-%s-%s-%s%s%s', \str_split(\bin2hex($data), 4)); } -} \ No newline at end of file +}