protected function _paginate(QueryBuilder $qb, int $offset, int $limit)
    {
        return $qb
            ->setFirstResult($offset)
            ->setMaxResults($limit);
    }
protected function _paginate(QueryBuilder $qb, int $offset, int $limit)
    {
        return $qb
            ->setFirstResult($offset)
            ->setMaxResults($limit);
    }
protected function _paginate ( QueryBuilder $ qb , int $ offset , int $ limit ) { return $ qb -> setFirstResult ( $ offset ) -> setMaxResults ( $ limit ) ; }
Improve QueryBuilder with basic paginate request

@param Doctrine\ORM\QueryBuilder
@param integer $offset
@param integer $limit
@return Doctrine\ORM\QueryBuilder
Improve QueryBuilder with basic paginate request