src/Paginator/Paginator.php
public function normalizePageNumber($pageNumber)
    {
        $pageNumber = (int) $pageNumber;

        if ($pageNumber < 1) {
            $pageNumber = 1;
        }

        $pageCount = $this->count();

        if ($pageCount > 0 && $pageNumber > $pageCount) {
            $pageNumber = $pageCount;
        }

        return $pageNumber;
    }
public function normalizePageNumber($pageNumber)
    {
        $pageNumber = (int) $pageNumber;

        if ($pageNumber < 1) {
            $pageNumber = 1;
        }

        $pageCount = $this->count();

        if ($pageCount > 0 && $pageNumber > $pageCount) {
            $pageNumber = $pageCount;
        }

        return $pageNumber;
    }
public function normalizePageNumber ( $ pageNumber ) { $ pageNumber = ( int ) $ pageNumber ; if ( $ pageNumber < 1 ) { $ pageNumber = 1 ; } $ pageCount = $ this -> count ( ) ; if ( $ pageCount > 0 && $ pageNumber > $ pageCount ) { $ pageNumber = $ pageCount ; } return $ pageNumber ; }
Brings the page number in range of the paginator.

@param  int $pageNumber
@return int
Brings the page number in range of the paginator .