Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 192-198 (lines=7) @@
189
     * @param QueryBuilder $qb
190
     * @param string       $name
191
     */
192
    protected function addQueryBuilderSort(\Doctrine\ORM\QueryBuilder $qb, $name)
193
    {
194
        $alias = current($qb->getDQLPart('from'))->getAlias();
195
        if (is_array($order = $this->getOrder($name))) {
196
            $qb->orderBy($alias . '.' . $order['field'], $order['type']);
197
        }
198
    }
199
200
    /**
201
     * Deletes a SubFamilyLog entity.

src/AppBundle/Controller/UserController.php 1 location

@@ 204-210 (lines=7) @@
201
     * @param QueryBuilder $qb
202
     * @param string       $name
203
     */
204
    protected function addQueryBuilderSort(QueryBuilder $qb, $name)
205
    {
206
        $alias = current($qb->getDQLPart('from'))->getAlias();
207
        if (is_array($order = $this->getOrder($name))) {
208
            $qb->orderBy($alias . '.' . $order['field'], $order['type']);
209
        }
210
    }
211
212
    /**
213
     * Save filters