original_string: protected function getPage($records, $maxshown, $numpages) {
          $show = floor($numpages / 2);
          if (self::$lastpage > $numpages) {
              self::$page = (self::$current > $show ? (self::$current - $show) : 1);
              if (self::$current < (self::$lastpage - $show)) {
                  self::$lastpage = ((self::$current <= $show) ? (self::$current + ($numpages - self::$current)) : (self::$current + $show));
              }
              else { self::$page = self::$current - ($numpages - ((ceil(intval($records) / ($maxshown >= 1 ? intval($maxshown) : 1)) - self::$current)) - 1); }
          }
          else { self::$page = 1; }
      }
code: protected function getPage($records, $maxshown, $numpages) {
          $show = floor($numpages / 2);
          if (self::$lastpage > $numpages) {
              self::$page = (self::$current > $show ? (self::$current - $show) : 1);
              if (self::$current < (self::$lastpage - $show)) {
                  self::$lastpage = ((self::$current <= $show) ? (self::$current + ($numpages - self::$current)) : (self::$current + $show));
              }
              else { self::$page = self::$current - ($numpages - ((ceil(intval($records) / ($maxshown >= 1 ? intval($maxshown) : 1)) - self::$current)) - 1); }
          }
          else { self::$page = 1; }
      }
code_tokens: protected function getPage ( $ records , $ maxshown , $ numpages ) { $ show = floor ( $ numpages / 2 ) ; if ( self :: $ lastpage > $ numpages ) { self :: $ page = ( self :: $ current > $ show ? ( self :: $ current - $ show ) : 1 ) ; if ( self :: $ current < ( self :: $ lastpage - $ show ) ) { self :: $ lastpage = ( ( self :: $ current <= $ show ) ? ( self :: $ current + ( $ numpages - self :: $ current ) ) : ( self :: $ current + $ show ) ) ; } else { self :: $ page = self :: $ current - ( $ numpages - ( ( ceil ( intval ( $ records ) / ( $ maxshown >= 1 ? intval ( $ maxshown ) : 1 ) ) - self :: $ current ) ) - 1 ) ; } } else { self :: $ page = 1 ; } }
docstring: Gets the current page
  @param int $records The total number of records
  @param int $maxshown The number of records that are shown on each page
  @param int $numpages The number of pagination buttons to display
  return void Nothing is returned
docstring_tokens: Gets the current page