Code Duplication    Length = 7-9 lines in 2 locations

database/seeds/CompetitorSeeder.php 1 location

@@ 27-33 (lines=7) @@
24
        $users[] = factory(User::class)->create(['name' => 't4']);
25
        $users[] = factory(User::class)->create(['name' => 't5']);
26
27
        foreach ($users as $user) {
28
            factory(Competitor::class)->create([
29
                'championship_id' => $championship->id,
30
                'user_id'         => $user->id,
31
                'confirmed'       => 1,
32
            ]);
33
        }
34
    }
35
}
36

src/TreeController.php 1 location

@@ 91-99 (lines=9) @@
88
        } else {
89
            $championship = Championship::find(1);
90
            $users = factory(User::class, (int)$numFighters)->create();
91
            foreach ($users as $user) {
92
                factory(Competitor::class)->create(
93
                    ['championship_id' => $championship->id,
94
                        'user_id' => $user->id,
95
                        'confirmed' => 1,
96
                        'short_id' => $user->id,
97
                    ]
98
                );
99
            }
100
        }
101
        $championship->settings = ChampionshipSettings::createOrUpdate($request, $championship);
102