Code Duplication    Length = 7-7 lines in 2 locations

includes/ConsoleTasks/MigrateToRoles.php 1 location

@@ 40-46 (lines=7) @@
37
                $toAdd[] = 'checkuser';
38
            }
39
40
            foreach ($toAdd as $x) {
41
                $a = new UserRole();
42
                $a->setUser($user['id']);
43
                $a->setRole($x);
44
                $a->setDatabase($database);
45
                $a->save();
46
            }
47
48
            $logData = serialize(array(
49
                'added' => $toAdd,

includes/Pages/PageUserManagement.php 1 location

@@ 150-156 (lines=7) @@
147
                $d->delete();
148
            }
149
150
            foreach ($add as $x) {
151
                $a = new UserRole();
152
                $a->setUser($user->getId());
153
                $a->setRole($x);
154
                $a->setDatabase($database);
155
                $a->save();
156
            }
157
158
            Logger::userRolesEdited($database, $user, $reason, $add, $removed);
159