Code Duplication    Length = 6-7 lines in 3 locations

app/Tournament.php 3 locations

@@ 149-154 (lines=6) @@
146
            $awayTeam['goalsDifference'] = ($awayTeam['goalsScored'] - $awayTeam['goalsAgainsted']);
147
148
            switch ($match->resultType) {
149
                case Match::RESULT_TYPE_HOME_WIN:
150
                    $homeTeam['wins']++;
151
                    $homeTeam['points'] += Match::POINTS_WIN;
152
                    $awayTeam['losts']++;
153
154
                    break;
155
                case Match::RESULT_TYPE_AWAY_WIN:
156
                    $awayTeam['wins']++;
157
                    $homeTeam['losts']++;
@@ 155-160 (lines=6) @@
152
                    $awayTeam['losts']++;
153
154
                    break;
155
                case Match::RESULT_TYPE_AWAY_WIN:
156
                    $awayTeam['wins']++;
157
                    $homeTeam['losts']++;
158
                    $awayTeam['points'] += Match::POINTS_WIN;
159
160
                    break;
161
                case Match::RESULT_TYPE_DRAW:
162
                    $homeTeam['draws']++;
163
                    $awayTeam['draws']++;
@@ 161-167 (lines=7) @@
158
                    $awayTeam['points'] += Match::POINTS_WIN;
159
160
                    break;
161
                case Match::RESULT_TYPE_DRAW:
162
                    $homeTeam['draws']++;
163
                    $awayTeam['draws']++;
164
                    $homeTeam['points'] += Match::POINTS_DRAW;
165
                    $awayTeam['points'] += Match::POINTS_DRAW;
166
167
                    break;
168
            }
169
        }
170