Code Duplication    Length = 15-15 lines in 2 locations

src/ClientBundle/Controller/SecurityController.php 2 locations

@@ 22-36 (lines=15) @@
19
     * @Method({"GET", "POST"})
20
     * @return Response
21
     */
22
    public function loginAction(Request $request)
23
    {
24
        $authenticationUtils = $this->get('security.authentication_utils');
25
26
        // get the login error if there is one
27
        $error = $authenticationUtils->getLastAuthenticationError();
28
29
        // last username entered by the user
30
        $lastUsername = $authenticationUtils->getLastUsername();
31
32
        return $this->render('ClientBundle:Security:login.html.twig', array(
33
            'last_username' => $lastUsername,
34
            'error'         => $error,
35
        ));
36
    }
37
38
    /**
39
     * @param Request $request
@@ 44-58 (lines=15) @@
41
     * @Method({"GET", "POST"})
42
     * @return Response
43
     */
44
    public function checkloginAction(Request $request)
45
    {
46
        $authenticationUtils = $this->get('security.authentication_utils');
47
48
        // get the login error if there is one
49
        $error = $authenticationUtils->getLastAuthenticationError();
50
51
        // last username entered by the user
52
        $lastUsername = $authenticationUtils->getLastUsername();
53
54
        return $this->render('ClientBundle:Security:login.html.twig', [
55
            'last_username' => $lastUsername,
56
            'error'         => $error,
57
        ]);
58
    }
59
}
60