public function getNextPage()
    {
        $nextPage = $this->getPage() + 1;
        $lastPage = $this->getLastPage();
        if ($lastPage < $nextPage) {
            $nextPage = $lastPage;
        }

        return $nextPage;
    }
public function getNextPage()
    {
        $nextPage = $this->getPage() + 1;
        $lastPage = $this->getLastPage();
        if ($lastPage < $nextPage) {
            $nextPage = $lastPage;
        }

        return $nextPage;
    }
public function getNextPage ( ) { $ nextPage = $ this -> getPage ( ) + 1 ; $ lastPage = $ this -> getLastPage ( ) ; if ( $ lastPage < $ nextPage ) { $ nextPage = $ lastPage ; } return $ nextPage ; }
Returns next page.

@return int
Returns next page .