Code Duplication    Length = 9-11 lines in 2 locations

src/AppBundle/Controller/Settings/Divers/UnitStorageController.php 1 location

@@ 41-49 (lines=9) @@
38
     * @Method("GET")
39
     * @Template()
40
     */
41
    public function indexAction(Request $request)
42
    {
43
        $em = $this->getDoctrine()->getManager();
44
        $qb = $em->getRepository('AppBundle:UnitStorage')->createQueryBuilder('u');
45
        $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20);
46
        return array(
47
            'paginator' => $paginator,
48
        );
49
    }
50
51
    /**
52
     * Finds and displays a UnitStorage entity.

src/AppBundle/Controller/SupplierController.php 1 location

@@ 43-53 (lines=11) @@
40
     * @Method("GET")
41
     * @Template()
42
     */
43
    public function indexAction(Request $request)
44
    {
45
        $em = $this->getDoctrine()->getManager();
46
        $qb = $em->getRepository('AppBundle:Supplier')->createQueryBuilder('s');
47
        $this->addQueryBuilderSort($qb, 'supplier');
48
        $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20);
49
        
50
        return array(
51
            'paginator' => $paginator,
52
        );
53
    }
54
55
    /**
56
     * Finds and displays a Supplier entity.