Code Duplication    Length = 8-8 lines in 2 locations

app/Jobs/Tournament/DrawKnockOut.php 2 locations

@@ 150-157 (lines=8) @@
147
            'status' => Match::STATUS_NOT_STARTED
148
        ];
149
150
        foreach ($pairs as $pair) {
151
            $this->tournament->matches()->create(
152
                array_merge($defaults, [
153
                    'homeTournamentTeamId' => array_get($pair->first(), 'id'),
154
                    'awayTournamentTeamId' => array_get($pair->last(), 'id'),
155
                ])
156
            );
157
        }
158
159
        // generate reverse matches only for match with `qualify` type
160
        if (Match::GAME_TYPE_QUALIFY === $gameType) {
@@ 161-168 (lines=8) @@
158
159
        // generate reverse matches only for match with `qualify` type
160
        if (Match::GAME_TYPE_QUALIFY === $gameType) {
161
            foreach ($pairs as $pair) {
162
                $this->tournament->matches()->create(
163
                    array_merge($defaults, [
164
                        'awayTournamentTeamId' => array_get($pair->first(), 'id'),
165
                        'homeTournamentTeamId' => array_get($pair->last(), 'id'),
166
                    ])
167
                );
168
            }
169
        }
170
    }
171
}