Code Duplication    Length = 18-18 lines in 2 locations

src/AppBundle/Controller/EditCounterController.php 2 locations

@@ 181-198 (lines=18) @@
178
     * @param string $username
179
     * @return Response
180
     */
181
    public function timecardAction($project, $username)
182
    {
183
        $this->setUpEditCounter($project, $username);
184
        $isSubRequest = $this->get('request_stack')->getParentRequest() !== null;
185
        $optedInPage = $this->project
186
            ->getRepository()
187
            ->getPage($this->project, $this->project->userOptInPage($this->user));
188
        return $this->render('editCounter/timecard.html.twig', [
189
            'xtTitle' => 'timecard',
190
            'xtPage' => 'ec',
191
            'is_sub_request' => $isSubRequest,
192
            'is_labs' => $this->project->getRepository()->isLabs(),
193
            'user' => $this->user,
194
            'project' => $this->project,
195
            'ec' => $this->editCounter,
196
            'opted_in_page' => $optedInPage,
197
        ]);
198
    }
199
200
    /**
201
     * Display the year counts section.
@@ 232-249 (lines=18) @@
229
     * @param string $username
230
     * @return Response
231
     */
232
    public function monthcountsAction($project, $username)
233
    {
234
        $this->setUpEditCounter($project, $username);
235
        $isSubRequest = $this->container->get('request_stack')->getParentRequest() !== null;
236
        $optedInPage = $this->project
237
            ->getRepository()
238
            ->getPage($this->project, $this->project->userOptInPage($this->user));
239
        return $this->render('editCounter/monthcounts.html.twig', [
240
            'xtTitle' => 'month-counts',
241
            'xtPage' => 'ec',
242
            'is_sub_request' => $isSubRequest,
243
            'is_labs' => $this->project->getRepository()->isLabs(),
244
            'user' => $this->user,
245
            'project' => $this->project,
246
            'ec' => $this->editCounter,
247
            'opted_in_page' => $optedInPage,
248
        ]);
249
    }
250
251
    /**
252
     * Display the latest global edits section.