original_string: protected function _getNumbersStartAndEnd($params, $options)
      {
          $half = (int)($options['modulus'] / 2);
          $end = max(1 + $options['modulus'], $params['page'] + $half);
          $start = min($params['pageCount'] - $options['modulus'], $params['page'] - $half - $options['modulus'] % 2);
  
          if ($options['first']) {
              $first = is_int($options['first']) ? $options['first'] : 1;
  
              if ($start <= $first + 2) {
                  $start = 1;
              }
          }
  
          if ($options['last']) {
              $last = is_int($options['last']) ? $options['last'] : 1;
  
              if ($end >= $params['pageCount'] - $last - 1) {
                  $end = $params['pageCount'];
              }
          }
  
          $end = min($params['pageCount'], $end);
          $start = max(1, $start);
  
          return [$start, $end];
      }
code: protected function _getNumbersStartAndEnd($params, $options)
      {
          $half = (int)($options['modulus'] / 2);
          $end = max(1 + $options['modulus'], $params['page'] + $half);
          $start = min($params['pageCount'] - $options['modulus'], $params['page'] - $half - $options['modulus'] % 2);
  
          if ($options['first']) {
              $first = is_int($options['first']) ? $options['first'] : 1;
  
              if ($start <= $first + 2) {
                  $start = 1;
              }
          }
  
          if ($options['last']) {
              $last = is_int($options['last']) ? $options['last'] : 1;
  
              if ($end >= $params['pageCount'] - $last - 1) {
                  $end = $params['pageCount'];
              }
          }
  
          $end = min($params['pageCount'], $end);
          $start = max(1, $start);
  
          return [$start, $end];
      }
code_tokens: protected function _getNumbersStartAndEnd ( $ params , $ options ) { $ half = ( int ) ( $ options [ 'modulus' ] / 2 ) ; $ end = max ( 1 + $ options [ 'modulus' ] , $ params [ 'page' ] + $ half ) ; $ start = min ( $ params [ 'pageCount' ] - $ options [ 'modulus' ] , $ params [ 'page' ] - $ half - $ options [ 'modulus' ] % 2 ) ; if ( $ options [ 'first' ] ) { $ first = is_int ( $ options [ 'first' ] ) ? $ options [ 'first' ] : 1 ; if ( $ start <= $ first + 2 ) { $ start = 1 ; } } if ( $ options [ 'last' ] ) { $ last = is_int ( $ options [ 'last' ] ) ? $ options [ 'last' ] : 1 ; if ( $ end >= $ params [ 'pageCount' ] - $ last - 1 ) { $ end = $ params [ 'pageCount' ] ; } } $ end = min ( $ params [ 'pageCount' ] , $ end ) ; $ start = max ( 1 , $ start ) ; return [ $ start , $ end ] ; }
docstring: Calculates the start and end for the pagination numbers.
  
  @param array $params Params from the numbers() method.
  @param array $options Options from the numbers() method.
  @return array An array with the start and end numbers.
docstring_tokens: Calculates the start and end for the pagination numbers .