Code Duplication    Length = 14-14 lines in 2 locations

src/AppBundle/Controller/SiteController.php 2 locations

@@ 32-45 (lines=14) @@
29
    /**
30
     * @Route("/", name="homepage")
31
     */
32
    public function indexAction(Request $request)
33
    {
34
        $em = $this->getDoctrine()->getManager();
35
        $estates = $em->getRepository('AppBundle:Estate')->getEstateExclusiveWithFiles();
36
        $paginator = $this->get('knp_paginator');
37
        $pagination = $paginator->paginate(
38
            $estates,
39
            $request->query->getInt('page', 1),
40
            5
41
        );
42
        $breadcrumbs = $this->get("white_october_breadcrumbs");
43
        $breadcrumbs->addItem("site.main");
44
        return $this->render("AppBundle::site/index.html.twig", array('pagination' => $pagination));
45
    }
46
47
    /**
48
     * @Route("/menu", name="menu")
@@ 63-76 (lines=14) @@
60
     * @Route("/show_category/{slug}", name="show_category")
61
     * @ParamConverter("category", class="AppBundle\Entity\Category", options={"mapping": {"slug": "title"}})
62
     */
63
    public function showCategoryAction(Request $request, Category $category)
64
    {
65
        $em = $this->getDoctrine()->getManager();
66
        $estates = $em->getRepository('AppBundle\Entity\Estate')->getEstateFromCategory($category->getTitle());
67
        $paginator = $this->get('knp_paginator');
68
        $pagination = $paginator->paginate(
69
            $estates,
70
            $request->query->getInt('page', 1),
71
            5
72
        );
73
        $this->container->get('app.breadcrumps_maker')->makeBreadcrumps($category);
74
75
        return $this->render("AppBundle::site/index.html.twig", array('pagination' => $pagination));
76
    }
77
78
    /**
79
     * @Route("/show_estate/{slug}", name="show_estate")