Pagination/DataSetPagination.php
protected function getNextPage($totalPages, $offset, $limit)
    {
        $nextPage = ($offset / $limit) + 2;
        if ($nextPage > $totalPages) {
            return null;
        }

        return $nextPage;
    }
protected function getNextPage($totalPages, $offset, $limit)
    {
        $nextPage = ($offset / $limit) + 2;
        if ($nextPage > $totalPages) {
            return null;
        }

        return $nextPage;
    }
protected function getNextPage ( $ totalPages , $ offset , $ limit ) { $ nextPage = ( $ offset / $ limit ) + 2 ; if ( $ nextPage > $ totalPages ) { return null ; } return $ nextPage ; }
Returns the next page or false if last page

@param int $totalPages
@param int $offset
@param int $limit

@return null|int
Returns the next page or false if last page