Code Duplication    Length = 12-15 lines in 2 locations

src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php 1 location

@@ 98-109 (lines=12) @@
95
    /**
96
     * @return Pagerfanta
97
     */
98
    public function getPagerfanta()
99
    {
100
        if (is_null($this->pagerfanta)) {
101
            $adapter = new DoctrineORMAdapter($this->getQuery());
102
            $this->pagerfanta = new Pagerfanta($adapter);
103
            $this->pagerfanta->setNormalizeOutOfRangePages(true);
104
            $this->pagerfanta->setMaxPerPage($this->getLimit());
105
            $this->pagerfanta->setCurrentPage($this->getPage());
106
        }
107
108
        return $this->pagerfanta;
109
    }
110
111
    /**
112
     * @param QueryBuilder $queryBuilder

src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineDBALAdminListConfigurator.php 1 location

@@ 88-102 (lines=15) @@
85
    /**
86
     * @return Pagerfanta
87
     */
88
    public function getPagerfanta()
89
    {
90
        if (is_null($this->pagerfanta)) {
91
            $adapter = new DoctrineDBALAdapter(
92
                $this->getQueryBuilder(),
93
                $this->getCountField(),
94
                $this->getUseDistinctCount()
95
            );
96
            $this->pagerfanta = new Pagerfanta($adapter);
97
            $this->pagerfanta->setMaxPerPage($this->getLimit());
98
            $this->pagerfanta->setCurrentPage($this->getPage());
99
        }
100
101
        return $this->pagerfanta;
102
    }
103
104
    /**
105
     * @param array $params