Code Duplication    Length = 16-17 lines in 2 locations

controllers/MatchController.php 1 location

@@ 110-125 (lines=16) @@
107
        });
108
    }
109
110
    public function editAction(Player $me, Match $match)
111
    {
112
        // TODO: Generating this response is unnecessary
113
        $response = $this->edit($match, $me, "match");
114
115
        if ($this->recalculateNeeded && $match->isOfficial()) {
116
            // Redirect to a confirmation form if we are assigning a new leader
117
            $url = Service::getGenerator()->generate('match_recalculate', array(
118
                'match' => $match->getId(),
119
            ));
120
121
            return new RedirectResponse($url);
122
        }
123
124
        return $response;
125
    }
126
127
    public function recalculateAction(Player $me, $match)
128
    {

controllers/TeamController.php 1 location

@@ 63-79 (lines=17) @@
60
        return $this->create($me);
61
    }
62
63
    public function editAction(Player $me, Team $team)
64
    {
65
        // TODO: Generating this response is unnecessary
66
        $response = $this->edit($team, $me, "team");
67
68
        if ($this->newLeader) {
69
            // Redirect to a confirmation form if we are assigning a new leader
70
            $url = Service::getGenerator()->generate('team_assign_leader', array(
71
                'team'   => $team->getAlias(),
72
                'player' => $this->newLeader->getAlias()
73
            ));
74
75
            return new RedirectResponse($url);
76
        }
77
78
        return $response;
79
    }
80
81
    public function deleteAction(Player $me, Team $team)
82
    {