Code Duplication    Length = 14-15 lines in 2 locations

dashboard/application/models/computing-support/Equipment_loan_model.php 1 location

@@ 8-22 (lines=15) @@
5
    public function __construct() {
6
    }
7
8
    public function loan($logged, $full_name, $ern, $make, $model, $sn) {
9
        
10
        $data = array(
11
            'logged' => $this->input->post('logged'),
12
            'full_name' => $this->input->post('full_name'),
13
            'ern' => $this->input->post('ern'),
14
            'make' => $this->input->post('make'),
15
            'model' => $this->input->post('model'),
16
            'sn' => $this->input->post('sn'),
17
            'date' => date("Y-m-d H:i:s", time()),
18
        );
19
        
20
        return $this->db->insert('equipment_loan', $data);
21
        
22
    }
23
24
}
25
?>

dashboard/application/models/computing-support/Ownership_model.php 1 location

@@ 8-21 (lines=14) @@
5
    public function __construct() {
6
    }
7
8
    public function create($logged, $staff_full, $make, $model, $sn) {
9
        
10
        $data = array(
11
            'logged' => $this->input->post('logged'),
12
            'logged_at' => date("Y-m-d H:i:s", time()),
13
            'staff_full' => $this->input->post('staff_full'),
14
            'make' => $this->input->post('make'),
15
            'model' => $this->input->post('model'),
16
            'sn' => $this->input->post('sn'),
17
        );
18
        
19
        return $this->db->insert('ownership', $data);
20
        
21
    }
22
    
23
    public function get_all_ownership() {
24
        $query = $this->db->get('ownership');