Code Duplication    Length = 11-11 lines in 11 locations

application/modules/payment_method_2checkout/payment_method_2checkout.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_interkassa/payment_method_interkassa.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_liqpay/payment_method_liqpay.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_oschadbank/payment_method_oschadbank.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_paypal/payment_method_paypal.php 1 location

@@ 68-78 (lines=11) @@
65
66
    //Конвертация в другую валюту
67
68
    public function convert($price, $currencyId) {
69
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
70
            $return['price'] = $price;
71
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
72
            return $return;
73
        } else {
74
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
75
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
76
            return $return;
77
        }
78
    }
79
80
    //Наценка
81

application/modules/payment_method_robokassa/payment_method_robokassa.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_sberbank/payment_method_sberbank.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_yakassa/payment_method_yakassa.php 1 location

@@ 67-77 (lines=11) @@
64
65
    //Конвертация в другую валюту
66
67
    public function convert($price, $currencyId) {
68
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
69
            $return['price'] = $price;
70
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
71
            return $return;
72
        } else {
73
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
74
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
75
            return $return;
76
        }
77
    }
78
79
    //Наценка
80

application/modules/payment_method_privat24/payment_method_privat24.php 1 location

@@ 76-86 (lines=11) @@
73
74
    //Конвертация в другую валюту
75
76
    public function convert($price, $currencyId) {
77
        if ($currencyId == Currency::create()->getMainCurrency()->getId()) {
78
            $return['price'] = $price;
79
            $return['code'] = Currency::create()->getMainCurrency()->getCode();
80
            return $return;
81
        } else {
82
            $return['price'] = Currency::create()->convert($price, $currencyId);
83
            $return['code'] = Currency::create()->getCodeById($currencyId);
84
            return $return;
85
        }
86
    }
87
88
    //Наценка
89

application/modules/payment_method_webmoney/payment_method_webmoney.php 1 location

@@ 68-78 (lines=11) @@
65
66
    //Конвертация в другую валюту
67
68
    public function convert($price, $currencyId) {
69
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
70
            $return['price'] = $price;
71
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
72
            return $return;
73
        } else {
74
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
75
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
76
            return $return;
77
        }
78
    }
79
80
    //Наценка
81

application/modules/payment_method_walletone/payment_method_walletone.php 1 location

@@ 79-89 (lines=11) @@
76
77
    //Конвертация в другую валюту
78
79
    public function convert($price, $currencyId) {
80
        if ($currencyId == \Currency\Currency::create()->getMainCurrency()->getId()) {
81
            $return['price'] = $price;
82
            $return['code'] = \Currency\Currency::create()->getMainCurrency()->getCode();
83
            return $return;
84
        } else {
85
            $return['price'] = \Currency\Currency::create()->convert($price, $currencyId);
86
            $return['code'] = \Currency\Currency::create()->getCodeById($currencyId);
87
            return $return;
88
        }
89
    }
90
91
    //Наценка
92