Code Duplication    Length = 8-8 lines in 2 locations

src/AppBundle/Controller/SiteController.php 2 locations

@@ 58-65 (lines=8) @@
55
     * @Route("/show_category/{slug}", name="show_category")
56
     * @ParamConverter("category", class="AppBundle\Entity\Category", options={"mapping": {"slug": "title"}})
57
     */
58
    public function showCategoryAction(Request $request, Category $category)
59
    {
60
        $em = $this->getDoctrine()->getManager();
61
        $estates = $em->getRepository('AppBundle\Entity\Estate')->getEstateFromCategory($category->getTitle());
62
        $this->container->get('app.breadcrumps_maker')->makeBreadcrumps($category);
63
64
        return $this->render("AppBundle::site/index.html.twig", array('estates' => $estates));
65
    }
66
67
    /**
68
     * @Route("/show_estate/{slug}", name="show_estate")
@@ 70-77 (lines=8) @@
67
    /**
68
     * @Route("/show_estate/{slug}", name="show_estate")
69
     */
70
    public function showEstateAction(Request $request, $slug)
71
    {
72
        $em = $this->getDoctrine()->getManager();
73
        $estate = $em->getRepository('AppBundle\Entity\Estate')->getEstateWithDistrictComment($slug);
74
        $this->container->get('app.breadcrumps_maker')->makeBreadcrumps($estate->getCategory(), $estate);
75
76
        return $this->render('AppBundle:site:show_estate.html.twig', array('estate' => $estate));
77
    }
78
79
    /**
80
     * @Security("is_granted('IS_AUTHENTICATED_FULLY')")