Code Duplication    Length = 16-19 lines in 11 locations

application/modules/payment_method_2checkout/payment_method_2checkout.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_liqpay
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_interkassa/payment_method_interkassa.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_liqpay
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_liqpay/payment_method_liqpay.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_liqpay
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_oschadbank/payment_method_oschadbank.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_liqpay
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_paypal/payment_method_paypal.php 1 location

@@ 49-64 (lines=16) @@
46
     * @param string $payName название payment_method_liqpay
47
     * @return string
48
     */
49
    public function getAdminForm($id, $payName = null) {
50
        if (!$this->dx_auth->is_admin()) {
51
            redirect('/');
52
            exit;
53
        }
54
55
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
56
        $key = $id . '_' . $nameMethod;
57
        $data = $this->getPaymentSettings($key);
58
59
        $codeTpl = \CMSFactory\assetManager::create()
60
                ->setData('data', $data)
61
                ->fetchTemplate('adminForm');
62
63
        return $codeTpl;
64
    }
65
66
    //Конвертация в другую валюту
67

application/modules/payment_method_robokassa/payment_method_robokassa.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_liqpay
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_sberbank/payment_method_sberbank.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_liqpay
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_yakassa/payment_method_yakassa.php 1 location

@@ 48-63 (lines=16) @@
45
     * @param string $payName название payment_method_yakassa
46
     * @return string
47
     */
48
    public function getAdminForm($id, $payName = null) {
49
        if (!$this->dx_auth->is_admin()) {
50
            redirect('/');
51
            exit;
52
        }
53
54
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
55
        $key = $id . '_' . $nameMethod;
56
        $data = $this->getPaymentSettings($key);
57
58
        $codeTpl = \CMSFactory\assetManager::create()
59
                ->setData('data', $data)
60
                ->fetchTemplate('adminForm');
61
62
        return $codeTpl;
63
    }
64
65
    //Конвертация в другую валюту
66

application/modules/payment_method_privat24/payment_method_privat24.php 1 location

@@ 57-72 (lines=16) @@
54
     * @param integer $id способу оплати
55
     * @return array та форму з даними цього масиву
56
     */
57
    public function getAdminForm($id, $payName = null) {
58
        if (!$this->dx_auth->is_admin()) {
59
            redirect('/');
60
            exit;
61
        }
62
63
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
64
        $key = $id . '_' . $nameMethod;
65
        $data = $this->getPaymentSettings($key);
66
67
        $codeTpl = \CMSFactory\assetManager::create()
68
                ->setData('data', $data)
69
                ->fetchTemplate('adminForm');
70
71
        return $codeTpl;
72
    }
73
74
    //Конвертация в другую валюту
75

application/modules/payment_method_webmoney/payment_method_webmoney.php 1 location

@@ 49-64 (lines=16) @@
46
     * @param string $payName название payment_method_liqpay
47
     * @return string
48
     */
49
    public function getAdminForm($id, $payName = null) {
50
        if (!$this->dx_auth->is_admin()) {
51
            redirect('/');
52
            exit;
53
        }
54
55
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
56
        $key = $id . '_' . $nameMethod;
57
        $data = $this->getPaymentSettings($key);
58
59
        $codeTpl = \CMSFactory\assetManager::create()
60
                ->setData('data', $data)
61
                ->fetchTemplate('adminForm');
62
63
        return $codeTpl;
64
    }
65
66
    //Конвертация в другую валюту
67

application/modules/payment_method_walletone/payment_method_walletone.php 1 location

@@ 57-75 (lines=19) @@
54
     * @param string $payName название payment_method_liqpay
55
     * @return string
56
     */
57
    public function getAdminForm($id, $payName = null) {
58
59
        if (!$this->dx_auth->is_admin()) {
60
            redirect('/');
61
            exit;
62
        }
63
64
        $nameMethod = $payName ? $payName : $this->paymentMethod->getPaymentSystemName();
65
66
        $key = $id . '_' . $nameMethod;
67
        $data = $this->getPaymentSettings($key);
68
69
        $codeTpl = \CMSFactory\assetManager::create()
70
            ->setData('data', $data)
71
            ->setData('currencyCodes', $this->currencyCodes)
72
            ->fetchTemplate('adminForm');
73
74
        return $codeTpl;
75
    }
76
77
    //Конвертация в другую валюту
78