Code Duplication    Length = 4-4 lines in 10 locations

dashboard/application/controllers/computing-support/Room_move.php 5 locations

@@ 119-122 (lines=4) @@
116
                
117
                preg_match('#\((.*?)\)#', $this->input->post('full_name'), $user_un);
118
                $user_un = $user_un[1];
119
                if (isset($full_name2)) {
120
                    preg_match('#\((.*?)\)#', $this->input->post('full_name2'), $user_un2);
121
                    $user_un2 = $user_un2[1];
122
                } else { $user_un2 = NULL; } if (isset($full_name3)) {
123
                    preg_match('#\((.*?)\)#', $this->input->post('full_name3'), $user_un3);
124
                    $user_un3 = $user_un3[1];
125
                } else { $user_un3 = NULL; } if (isset($full_name4)) {
@@ 125-128 (lines=4) @@
122
                } else { $user_un2 = NULL; } if (isset($full_name3)) {
123
                    preg_match('#\((.*?)\)#', $this->input->post('full_name3'), $user_un3);
124
                    $user_un3 = $user_un3[1];
125
                } else { $user_un3 = NULL; } if (isset($full_name4)) {
126
                    preg_match('#\((.*?)\)#', $this->input->post('full_name4'), $user_un4);
127
                    $user_un4 = $user_un4[1];
128
                } else { $user_un4 = NULL; } if (isset($full_name5)) {
129
                    preg_match('#\((.*?)\)#', $this->input->post('full_name5'), $user_un5);
130
                    $user_un5 = $user_un5[1];
131
                } else { $user_un5 = NULL; } if (isset($full_name6)) {
@@ 131-134 (lines=4) @@
128
                } else { $user_un4 = NULL; } if (isset($full_name5)) {
129
                    preg_match('#\((.*?)\)#', $this->input->post('full_name5'), $user_un5);
130
                    $user_un5 = $user_un5[1];
131
                } else { $user_un5 = NULL; } if (isset($full_name6)) {
132
                    preg_match('#\((.*?)\)#', $this->input->post('full_name6'), $user_un6);
133
                    $user_un6 = $user_un6[1];
134
                } else { $user_un6 = NULL; } if (isset($full_name7)) {
135
                    preg_match('#\((.*?)\)#', $this->input->post('full_name7'), $user_un7);
136
                    $user_un7 = $user_un7[1];
137
                } else { $user_un7 = NULL; } if (isset($full_name8)) {
@@ 137-140 (lines=4) @@
134
                } else { $user_un6 = NULL; } if (isset($full_name7)) {
135
                    preg_match('#\((.*?)\)#', $this->input->post('full_name7'), $user_un7);
136
                    $user_un7 = $user_un7[1];
137
                } else { $user_un7 = NULL; } if (isset($full_name8)) {
138
                    preg_match('#\((.*?)\)#', $this->input->post('full_name8'), $user_un8);
139
                    $user_un8 = $user_un8[1];
140
                } else { $user_un8 = NULL; } if (isset($full_name9)) {
141
                    preg_match('#\((.*?)\)#', $this->input->post('full_name9'), $user_un9);
142
                    $user_un9 = $user_un9[1];
143
                } else { $user_un9 = NULL; } if (isset($full_name10)) {
@@ 143-146 (lines=4) @@
140
                } else { $user_un8 = NULL; } if (isset($full_name9)) {
141
                    preg_match('#\((.*?)\)#', $this->input->post('full_name9'), $user_un9);
142
                    $user_un9 = $user_un9[1];
143
                } else { $user_un9 = NULL; } if (isset($full_name10)) {
144
                    preg_match('#\((.*?)\)#', $this->input->post('full_name10'), $user_un10);
145
                    $user_un10 = $user_un10[1];
146
                } else { $user_un10 = NULL; }
147
                
148
                $requester_email = $_SESSION['ldap']['email'];
149
                

dashboard/application/models/computing-support/Room_move_model.php 5 locations

@@ 13-16 (lines=4) @@
10
        
11
        preg_match('#\((.*?)\)#', $this->input->post('full_name'), $user_un);
12
        $user_un = $user_un[1];
13
                if (isset($full_name2)) {
14
                    preg_match('#\((.*?)\)#', $this->input->post('full_name2'), $user_un2);
15
                    $user_un2 = $user_un2[1];
16
                } else { $user_un2 = NULL; } if (isset($full_name3)) {
17
                    preg_match('#\((.*?)\)#', $this->input->post('full_name3'), $user_un3);
18
                    $user_un3 = $user_un3[1];
19
                } else { $user_un3 = NULL; } if (isset($full_name4)) {
@@ 19-22 (lines=4) @@
16
                } else { $user_un2 = NULL; } if (isset($full_name3)) {
17
                    preg_match('#\((.*?)\)#', $this->input->post('full_name3'), $user_un3);
18
                    $user_un3 = $user_un3[1];
19
                } else { $user_un3 = NULL; } if (isset($full_name4)) {
20
                    preg_match('#\((.*?)\)#', $this->input->post('full_name4'), $user_un4);
21
                    $user_un4 = $user_un4[1];
22
                } else { $user_un4 = NULL; } if (isset($full_name5)) {
23
                    preg_match('#\((.*?)\)#', $this->input->post('full_name5'), $user_un5);
24
                    $user_un5 = $user_un5[1];
25
                } else { $user_un5 = NULL; } if (isset($full_name6)) {
@@ 25-28 (lines=4) @@
22
                } else { $user_un4 = NULL; } if (isset($full_name5)) {
23
                    preg_match('#\((.*?)\)#', $this->input->post('full_name5'), $user_un5);
24
                    $user_un5 = $user_un5[1];
25
                } else { $user_un5 = NULL; } if (isset($full_name6)) {
26
                    preg_match('#\((.*?)\)#', $this->input->post('full_name6'), $user_un6);
27
                    $user_un6 = $user_un6[1];
28
                } else { $user_un6 = NULL; } if (isset($full_name7)) {
29
                    preg_match('#\((.*?)\)#', $this->input->post('full_name7'), $user_un7);
30
                    $user_un7 = $user_un7[1];
31
                } else { $user_un7 = NULL; } if (isset($full_name8)) {
@@ 31-34 (lines=4) @@
28
                } else { $user_un6 = NULL; } if (isset($full_name7)) {
29
                    preg_match('#\((.*?)\)#', $this->input->post('full_name7'), $user_un7);
30
                    $user_un7 = $user_un7[1];
31
                } else { $user_un7 = NULL; } if (isset($full_name8)) {
32
                    preg_match('#\((.*?)\)#', $this->input->post('full_name8'), $user_un8);
33
                    $user_un8 = $user_un8[1];
34
                } else { $user_un8 = NULL; } if (isset($full_name9)) {
35
                    preg_match('#\((.*?)\)#', $this->input->post('full_name9'), $user_un9);
36
                    $user_un9 = $user_un9[1];
37
                } else { $user_un9 = NULL; } if (isset($full_name10)) {
@@ 37-40 (lines=4) @@
34
                } else { $user_un8 = NULL; } if (isset($full_name9)) {
35
                    preg_match('#\((.*?)\)#', $this->input->post('full_name9'), $user_un9);
36
                    $user_un9 = $user_un9[1];
37
                } else { $user_un9 = NULL; } if (isset($full_name10)) {
38
                    preg_match('#\((.*?)\)#', $this->input->post('full_name10'), $user_un10);
39
                    $user_un10 = $user_un10[1];
40
                } else { $user_un10 = NULL; }
41
                
42
        if ($furniture == "No Furniture"){
43
            $status = "1";