Code Duplication    Length = 8-9 lines in 11 locations

application/modules/payment_method_2checkout/payment_method_2checkout.php 1 location

@@ 235-243 (lines=9) @@
232
233
    }
234
235
    public function _install() {
236
        $ci = &get_instance();
237
238
        $result = $ci->db->where('name', $this->moduleName)
239
            ->update('components', ['enabled' => '1']);
240
        if ($ci->db->_error_message()) {
241
            show_error($ci->db->_error_message());
242
        }
243
    }
244
245
    public function _deinstall() {
246
        $ci = &get_instance();

application/modules/payment_method_interkassa/payment_method_interkassa.php 1 location

@@ 244-252 (lines=9) @@
241
242
    }
243
244
    public function _install() {
245
        $ci = &get_instance();
246
247
        $result = $ci->db->where('name', $this->moduleName)
248
            ->update('components', ['enabled' => '1']);
249
        if ($ci->db->_error_message()) {
250
            show_error($ci->db->_error_message());
251
        }
252
    }
253
254
    public function _deinstall() {
255
        $ci = &get_instance();

application/modules/payment_method_liqpay/payment_method_liqpay.php 1 location

@@ 249-257 (lines=9) @@
246
247
    }
248
249
    public function _install() {
250
        $ci = &get_instance();
251
252
        $result = $ci->db->where('name', $this->moduleName)
253
            ->update('components', ['enabled' => '1']);
254
        if ($ci->db->_error_message()) {
255
            show_error($ci->db->_error_message());
256
        }
257
    }
258
259
    public function _deinstall() {
260
        $ci = &get_instance();

application/modules/payment_method_oschadbank/payment_method_oschadbank.php 1 location

@@ 404-412 (lines=9) @@
401
402
    }
403
404
    public function _install() {
405
        $ci = &get_instance();
406
407
        $result = $ci->db->where('name', $this->moduleName)
408
            ->update('components', ['enabled' => '1']);
409
        if ($ci->db->_error_message()) {
410
            show_error($ci->db->_error_message());
411
        }
412
    }
413
414
    public function _deinstall() {
415
        $ci = &get_instance();

application/modules/payment_method_paypal/payment_method_paypal.php 1 location

@@ 242-250 (lines=9) @@
239
240
    }
241
242
    public function _install() {
243
        $ci = &get_instance();
244
245
        $result = $ci->db->where('name', $this->moduleName)
246
            ->update('components', ['enabled' => '1']);
247
        if ($ci->db->_error_message()) {
248
            show_error($ci->db->_error_message());
249
        }
250
    }
251
252
    public function _deinstall() {
253
        $ci = &get_instance();

application/modules/payment_method_robokassa/payment_method_robokassa.php 1 location

@@ 238-246 (lines=9) @@
235
236
    }
237
238
    public function _install() {
239
        $ci = &get_instance();
240
241
        $result = $ci->db->where('name', $this->moduleName)
242
            ->update('components', ['enabled' => '1']);
243
        if (!$result) {
244
            show_error($ci->db->_error_message());
245
        }
246
    }
247
248
    public function _deinstall() {
249
        $ci = &get_instance();

application/modules/payment_method_sberbank/payment_method_sberbank.php 1 location

@@ 333-341 (lines=9) @@
330
331
    }
332
333
    public function _install() {
334
        $ci = &get_instance();
335
336
        $result = $ci->db->where('name', $this->moduleName)
337
            ->update('components', ['enabled' => '1']);
338
        if ($ci->db->_error_message()) {
339
            show_error($ci->db->_error_message());
340
        }
341
    }
342
343
    public function _deinstall() {
344
        $ci = &get_instance();

application/modules/payment_method_yakassa/payment_method_yakassa.php 1 location

@@ 291-299 (lines=9) @@
288
289
    }
290
291
    public function _install() {
292
        $ci = &get_instance();
293
294
        $result = $ci->db->where('name', $this->moduleName)
295
            ->update('components', ['enabled' => '1']);
296
        if ($ci->db->_error_message()) {
297
            show_error($ci->db->_error_message());
298
        }
299
    }
300
301
    public function _deinstall() {
302
        $ci = &get_instance();

application/modules/payment_method_privat24/payment_method_privat24.php 1 location

@@ 244-251 (lines=8) @@
241
242
    }
243
244
    public function _install() {
245
        $ci = &get_instance();
246
        $result = $ci->db->where('name', 'payment_method_privat24')
247
            ->update('components', ['enabled' => '1']);
248
        if (!$result) {
249
            show_error($ci->db->_error_message());
250
        }
251
    }
252
253
    public function _deinstall() {
254
        $ci = &get_instance();

application/modules/payment_method_webmoney/payment_method_webmoney.php 1 location

@@ 242-250 (lines=9) @@
239
240
    }
241
242
    public function _install() {
243
        $ci = &get_instance();
244
245
        $result = $ci->db->where('name', $this->moduleName)
246
            ->update('components', ['enabled' => '1']);
247
        if ($ci->db->_error_message()) {
248
            show_error($ci->db->_error_message());
249
        }
250
    }
251
252
    public function _deinstall() {
253
        $ci = &get_instance();

application/modules/payment_method_walletone/payment_method_walletone.php 1 location

@@ 294-302 (lines=9) @@
291
292
    }
293
294
    public function _install() {
295
        $ci = &get_instance();
296
297
        $result = $ci->db->where('name', $this->moduleName)
298
            ->update('components', ['enabled' => '1']);
299
        if ($ci->db->_error_message()) {
300
            show_error($ci->db->_error_message());
301
        }
302
    }
303
304
    public function _deinstall() {
305
        $ci = &get_instance();