private function appendLimitAndOffset(QueryBuilder $builder, $limit, $offset)
    {
        $limit = (int) $limit;
        $offset = (int) $offset;

        if ($limit > 0) {
            $builder->limit($limit);
        }

        if ($offset > 0) {
            $builder->skip($offset);
        }
        return $this;
    }
private function appendLimitAndOffset(QueryBuilder $builder, $limit, $offset)
    {
        $limit = (int) $limit;
        $offset = (int) $offset;

        if ($limit > 0) {
            $builder->limit($limit);
        }

        if ($offset > 0) {
            $builder->skip($offset);
        }
        return $this;
    }
private function appendLimitAndOffset ( QueryBuilder $ builder , $ limit , $ offset ) { $ limit = ( int ) $ limit ; $ offset = ( int ) $ offset ; if ( $ limit > 0 ) { $ builder -> limit ( $ limit ) ; } if ( $ offset > 0 ) { $ builder -> skip ( $ offset ) ; } return $ this ; }
Appends offset and limit criteria to a Query Builder

@param   QueryBuilder    $builder
@param   int             $limit
@param   int             $offset
@return  self
Appends offset and limit criteria to a Query Builder