Skip to content

Commit 9c15047

Browse files
author
Ivan Tagil
committed
CMP-41 - Code Improvements
1 parent 520f0ba commit 9c15047

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

Model/Adminhtml/Source/AllSpecificCurrencies.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
* Copyright © CM.com. All rights reserved.
44
* See LICENSE.txt for license details.
55
*/
6-
namespace CM\Payments\Model\AdminHtml\Source;
76

8-
class AllSpecificCurrencies implements \Magento\Framework\Option\ArrayInterface
7+
declare(strict_types=1);
8+
9+
namespace CM\Payments\Model\Adminhtml\Source;
10+
11+
use Magento\Framework\Data\OptionSourceInterface;
12+
13+
class AllSpecificCurrencies implements OptionSourceInterface
914
{
1015
/**
1116
* {@inheritdoc}

Model/Adminhtml/Source/Currency.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
* Copyright © CM.com. All rights reserved.
44
* See LICENSE.txt for license details.
55
*/
6-
namespace CM\Payments\Model\AdminHtml\Source;
76

8-
class Currency implements \Magento\Framework\Option\ArrayInterface
7+
declare(strict_types=1);
8+
9+
namespace CM\Payments\Model\Adminhtml\Source;
10+
11+
use Magento\Framework\Data\OptionSourceInterface;
12+
13+
class Currency implements OptionSourceInterface
914
{
1015
/**
1116
* Countries
@@ -32,7 +37,7 @@ public function __construct(\Magento\Directory\Model\Currency $currency)
3237
/**
3338
* Return options array
3439
*
35-
* @param boolean $isMultiselect
40+
* @param bool $isMultiselect
3641
* @param string|array $foregroundCountries
3742
* @return array
3843
*/

etc/adminhtml/system.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<field id="allow_specific_currency" translate="label" type="select" sortOrder="51" showInDefault="1"
148148
showInWebsite="1" showInStore="1">
149149
<label>Payment from Applicable Currencies</label>
150-
<source_model>CM\Payments\Model\AdminHtml\Source\AllSpecificCurrencies</source_model>
150+
<source_model>CM\Payments\Model\Adminhtml\Source\AllSpecificCurrencies</source_model>
151151
<config_path>payment/cm_payments_creditcard/allow_specific_currency</config_path>
152152
<depends>
153153
<field id="active">1</field>
@@ -156,7 +156,7 @@
156156
<field id="specific_currency" translate="label" type="multiselect" sortOrder="52" showInDefault="1"
157157
showInWebsite="1" showInStore="1">
158158
<label>Payment from Specific Currencies</label>
159-
<source_model>CM\Payments\Model\AdminHtml\Source\Currency</source_model>
159+
<source_model>CM\Payments\Model\Adminhtml\Source\Currency</source_model>
160160
<can_be_empty>1</can_be_empty>
161161
<config_path>payment/cm_payments_creditcard/specific_currency</config_path>
162162
<depends>
@@ -220,7 +220,7 @@
220220
<field id="allow_specific_currency" translate="label" type="select" sortOrder="51" showInDefault="1"
221221
showInWebsite="1" showInStore="1">
222222
<label>Payment from Applicable Currencies</label>
223-
<source_model>CM\Payments\Model\AdminHtml\Source\AllSpecificCurrencies</source_model>
223+
<source_model>CM\Payments\Model\Adminhtml\Source\AllSpecificCurrencies</source_model>
224224
<config_path>payment/cm_payments_ideal/allow_specific_currency</config_path>
225225
<depends>
226226
<field id="active">1</field>
@@ -229,7 +229,7 @@
229229
<field id="specific_currency" translate="label" type="multiselect" sortOrder="52" showInDefault="1"
230230
showInWebsite="1" showInStore="1">
231231
<label>Payment from Specific Currencies</label>
232-
<source_model>CM\Payments\Model\AdminHtml\Source\Currency</source_model>
232+
<source_model>CM\Payments\Model\Adminhtml\Source\Currency</source_model>
233233
<can_be_empty>1</can_be_empty>
234234
<config_path>payment/cm_payments_ideal/specific_currency</config_path>
235235
<depends>
@@ -293,7 +293,7 @@
293293
<field id="allow_specific_currency" translate="label" type="select" sortOrder="51" showInDefault="1"
294294
showInWebsite="1" showInStore="1">
295295
<label>Payment from Applicable Currencies</label>
296-
<source_model>CM\Payments\Model\AdminHtml\Source\AllSpecificCurrencies</source_model>
296+
<source_model>CM\Payments\Model\Adminhtml\Source\AllSpecificCurrencies</source_model>
297297
<config_path>payment/cm_payments_paypal/allow_specific_currency</config_path>
298298
<depends>
299299
<field id="active">1</field>
@@ -302,7 +302,7 @@
302302
<field id="specific_currency" translate="label" type="multiselect" sortOrder="52" showInDefault="1"
303303
showInWebsite="1" showInStore="1">
304304
<label>Payment from Specific Currencies</label>
305-
<source_model>CM\Payments\Model\AdminHtml\Source\Currency</source_model>
305+
<source_model>CM\Payments\Model\Adminhtml\Source\Currency</source_model>
306306
<can_be_empty>1</can_be_empty>
307307
<config_path>payment/cm_payments_paypal/specific_currency</config_path>
308308
<depends>
@@ -374,7 +374,7 @@
374374
<field id="allow_specific_currency" translate="label" type="select" sortOrder="51" showInDefault="1"
375375
showInWebsite="1" showInStore="1">
376376
<label>Payment from Applicable Currencies</label>
377-
<source_model>CM\Payments\Model\AdminHtml\Source\AllSpecificCurrencies</source_model>
377+
<source_model>CM\Payments\Model\Adminhtml\Source\AllSpecificCurrencies</source_model>
378378
<config_path>payment/cm_payments_paypal/allow_specific_currency</config_path>
379379
<depends>
380380
<field id="active">1</field>
@@ -383,7 +383,7 @@
383383
<field id="specific_currency" translate="label" type="multiselect" sortOrder="52" showInDefault="1"
384384
showInWebsite="1" showInStore="1">
385385
<label>Payment from Specific Currencies</label>
386-
<source_model>CM\Payments\Model\AdminHtml\Source\Currency</source_model>
386+
<source_model>CM\Payments\Model\Adminhtml\Source\Currency</source_model>
387387
<can_be_empty>1</can_be_empty>
388388
<config_path>payment/cm_payments_paypal/specific_currency</config_path>
389389
<depends>

0 commit comments

Comments
 (0)