Code Duplication    Length = 12-14 lines in 4 locations

src/database/seeds/AclSeeder.php 3 locations

@@ 14-25 (lines=12) @@
11
        $this->linkRolesAndPermissions();
12
    }
13
14
    private function insertPermissions()
15
    {
16
        // Truncate the table each time.
17
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
18
        DB::table('acl_permissions')->truncate();
19
        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
20
21
        $permissions = config('users.permissions');
22
23
        // Add any data to the table.
24
        DB::table('acl_permissions')->insert($permissions);
25
    }
26
27
    private function insertRoles()
28
    {
@@ 27-40 (lines=14) @@
24
        DB::table('acl_permissions')->insert($permissions);
25
    }
26
27
    private function insertRoles()
28
    {
29
        // Truncate the table each time.
30
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
31
        DB::table('acl_roles')->truncate();
32
        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
33
34
        $roles = config('users.roles');
35
36
        // Add any data to the table.
37
        DB::table('acl_roles')->insert($roles);
38
    }
39
40
    private function linkRolesAndPermissions()
41
    {
42
        // Truncate the table each time.
43
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
@@ 40-51 (lines=12) @@
37
        DB::table('acl_roles')->insert($roles);
38
    }
39
40
    private function linkRolesAndPermissions()
41
    {
42
        // Truncate the table each time.
43
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
44
        DB::table('acl_permission_role')->truncate();
45
        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
46
47
        $permissions = config('users.permission_role');
48
49
        // Add any data to the table.
50
        DB::table('acl_permission_role')->insert($permissions);
51
    }
52
}
53

src/database/seeds/NukaCodeUserSeeder.php 1 location

@@ 8-19 (lines=12) @@
5
class NukaCodeUserSeeder extends Seeder
6
{
7
8
    public function run()
9
    {
10
        // Truncate the table each time.
11
        DB::statement('SET FOREIGN_KEY_CHECKS=0;');
12
        DB::table('users')->truncate();
13
        DB::statement('SET FOREIGN_KEY_CHECKS=1;');
14
15
        $users = config('users.users');
16
17
        // Add any data to the table.
18
        DB::table('users')->insert($users);
19
    }
20
}
21