Code Duplication    Length = 10-10 lines in 2 locations

src/AppBundle/Controller/ClientController.php 2 locations

@@ 13-22 (lines=10) @@
10
    /**
11
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
12
     */
13
    public function lockAction()
14
    {
15
        $swindler = $this->admin
16
            ->getSubject()
17
            ->setBanned(true);
18
        $em = $this->getDoctrine()->getManager();
19
        $em->flush($swindler);
20
21
        return new RedirectResponse($this->admin->generateUrl('list'));
22
    }
23
24
    /**
25
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
@@ 27-36 (lines=10) @@
24
    /**
25
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
26
     */
27
    public function unlockAction()
28
    {
29
        $swindler = $this->admin
30
            ->getSubject()
31
            ->setBanned(false);
32
        $em = $this->getDoctrine()->getManager();
33
        $em->flush($swindler);
34
35
        return new RedirectResponse($this->admin->generateUrl('list'));
36
    }
37
}
38