Code Duplication    Length = 14-14 lines in 2 locations

src/AppBundle/Controller/SiteController.php 2 locations

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