Code Duplication    Length = 17-17 lines in 2 locations

src/AppBundle/Controller/EditCounterController.php 2 locations

@@ 195-211 (lines=17) @@
192
     * @param string $username
193
     * @return Response
194
     */
195
    public function timecardAction($project, $username)
196
    {
197
        $this->setUpEditCounter($project, $username);
198
        $isSubRequest = $this->get('request_stack')->getParentRequest() !== null;
199
        $optedInPage = $this->project
200
            ->getRepository()
201
            ->getPage($this->project, $this->project->userOptInPage($this->user));
202
        return $this->render('editCounter/timecard.html.twig', [
203
            'xtTitle' => $this->user->getUsername(),
204
            'xtPage' => 'ec',
205
            'is_sub_request' => $isSubRequest,
206
            'user' => $this->user,
207
            'project' => $this->project,
208
            'ec' => $this->editCounter,
209
            'opted_in_page' => $optedInPage,
210
        ]);
211
    }
212
213
    /**
214
     * Display the year counts section.
@@ 242-258 (lines=17) @@
239
     * @param string $username
240
     * @return Response
241
     */
242
    public function monthcountsAction(Request $request, $project, $username)
243
    {
244
        $this->setUpEditCounter($project, $username);
245
        $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null;
246
        $optedInPage = $this->project
247
            ->getRepository()
248
            ->getPage($this->project, $this->project->userOptInPage($this->user));
249
        return $this->render('editCounter/monthcounts.html.twig', [
250
            'xtTitle' => $this->user->getUsername(),
251
            'xtPage' => 'ec',
252
            'is_sub_request' => $isSubRequest,
253
            'user' => $this->user,
254
            'project' => $this->project,
255
            'ec' => $this->editCounter,
256
            'opted_in_page' => $optedInPage,
257
        ]);
258
    }
259
260
    /**
261
     * Display the latest global edits section.