private function getPagination($page)
    {
        $limit = 5;
        if ($page !== null) {
            if ($page === 'all') {
                $limit = null;
                $page = null;
            } else {
                $page = (int) $page;
            }
        } else {
            $page = 1;
        }

        return ['page' => $page, 'limit' => $limit];
    }
private function getPagination($page)
    {
        $limit = 5;
        if ($page !== null) {
            if ($page === 'all') {
                $limit = null;
                $page = null;
            } else {
                $page = (int) $page;
            }
        } else {
            $page = 1;
        }

        return ['page' => $page, 'limit' => $limit];
    }
private function getPagination ( $ page ) { $ limit = 5 ; if ( $ page !== null ) { if ( $ page === 'all' ) { $ limit = null ; $ page = null ; } else { $ page = ( int ) $ page ; } } else { $ page = 1 ; } return [ 'page' => $ page , 'limit' => $ limit ] ; }
Calculate pagination parameters.

@param int|string|null $page

@return array
Calculate pagination parameters .