Code Duplication    Length = 15-15 lines in 2 locations

src/Http/Controllers/ProgramKeahlianController.php 2 locations

@@ 136-150 (lines=15) @@
133
        $program_keahlian->keterangan   = null;
134
        $program_keahlian->user_id      = null;
135
136
        if (Auth::User()->hasRole(['superadministrator'])) {
137
            $user_special = true;
138
139
            foreach ($users_special as $user) {
140
                array_set($user, 'label', $user->name);
141
            }
142
143
            $users = $users_special;
144
        } else {
145
            $user_special = false;
146
147
            array_set($users_standar, 'label', $users_standar->name);
148
149
            $users = $users_standar;
150
        }
151
152
        array_set($current_user, 'label', $current_user->name);
153
@@ 244-258 (lines=15) @@
241
            array_set($program_keahlian->user, 'label', $program_keahlian->user->name);
242
        }
243
244
        if (Auth::User()->hasRole(['superadministrator'])) {
245
            $user_special = true;
246
247
            foreach ($users_special as $user) {
248
                array_set($user, 'label', $user->name);
249
            }
250
251
            $users = $users_special;
252
        } else {
253
            $user_special = false;
254
255
            array_set($users_standar, 'label', $users_standar->name);
256
257
            $users = $users_standar;
258
        }
259
260
        array_set($current_user, 'label', $current_user->name);
261