Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 201-207 (lines=7) @@
198
     * @param QueryBuilder $qb
199
     * @param string       $name
200
     */
201
    protected function addQueryBuilderSort(\Doctrine\ORM\QueryBuilder $qb, $name)
202
    {
203
        $alias = current($qb->getDQLPart('from'))->getAlias();
204
        if (is_array($order = $this->getOrder($name))) {
205
            $qb->orderBy($alias . '.' . $order['field'], $order['type']);
206
        }
207
    }
208
209
    /**
210
     * Deletes a SubFamilyLog entity.

src/AppBundle/Controller/UserController.php 1 location

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