Code Duplication    Length = 7-8 lines in 2 locations

database/seeds/CompetitorSeeder.php 1 location

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

src/TreeController.php 1 location

@@ 66-73 (lines=8) @@
63
64
        $users = factory(User::class, (int)$numFighters)->create();
65
66
        foreach ($users as $user) {
67
            factory(Competitor::class)->create([
68
                'championship_id' => $championship->id,
69
                'user_id' => $user->id,
70
                'confirmed' => 1,
71
                'short_id' => $user->id
72
            ]);
73
        }
74
        $championship->settings = ChampionshipSettings::createOrUpdate($request, $championship);
75
76
        $generation = $this->chooseGenerationStrategy($championship);