Code Duplication    Length = 11-11 lines in 2 locations

app/Containers/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php 2 locations

@@ 36-46 (lines=11) @@
33
            $table->timestamps();
34
        });
35
36
        Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $foreignKeys) {
37
            $table->integer('permission_id')->unsigned();
38
            $table->morphs('model');
39
40
            $table->foreign('permission_id')
41
                ->references('id')
42
                ->on($tableNames['permissions'])
43
                ->onDelete('cascade');
44
45
            $table->primary(['model_type', 'model_id', 'permission_id']);
46
        });
47
48
        Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $foreignKeys) {
49
            $table->integer('role_id')->unsigned();
@@ 48-58 (lines=11) @@
45
            $table->primary(['model_type', 'model_id', 'permission_id']);
46
        });
47
48
        Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $foreignKeys) {
49
            $table->integer('role_id')->unsigned();
50
            $table->morphs('model');
51
52
            $table->foreign('role_id')
53
                ->references('id')
54
                ->on($tableNames['roles'])
55
                ->onDelete('cascade');
56
57
            $table->primary(['model_id', 'role_id', 'model_type']);
58
        });
59
60
        Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) {
61
            $table->integer('permission_id')->unsigned();