Code Duplication    Length = 9-10 lines in 2 locations

application/modules/banners/banners.php 1 location

@@ 20-29 (lines=10) @@
17
18
    public $no_install = true;
19
20
    public function __construct() {
21
        parent::__construct();
22
        if (count($this->db->where('name', 'banners')->get('components')->result_array()) == 0) {
23
            $this->no_install = false;
24
        }
25
        $this->load->module('core');
26
        $this->load->model('banner_model');
27
        $lang = new MY_Lang();
28
        $lang->load('banners');
29
    }
30
31
    public function index() {
32
        if ($this->no_install === false) {

application/modules/share/share.php 1 location

@@ 29-37 (lines=9) @@
26
    /**
27
     * Share constructor.
28
     */
29
    public function __construct() {
30
31
        parent::__construct();
32
        $lang = new MY_Lang();
33
        $lang->load('share');
34
        $this->load->module('core');
35
36
        $this->db->select('settings');
37
        $this->settings = unserialize(implode(',', $this->db->get_where('components', ['name' => 'share'])->row_array()));
38
    }
39
40
    /**