original_string: protected function getPaginationData(Select $query, array $options)
      {
          // Get pagination options
          $page = (int) Arr::get($options, 'page');
  
          if ($page < 1) {
              $page = 1;
          }
  
          $resultsPerPage = Arr::get(
              $options,
              'resultsPerPage',
              $this->resultsPerPage
          );
  
          // Get total results
          $resultCount = $this->getQueryResultCount($query);
          $pageCount   = ceil($resultCount / $resultsPerPage);
  
          return new PaginationData([
              'page'             => $page,
              'page_count'       => $pageCount,
              'result_count'     => $resultCount,
              'results_per_page' => $resultsPerPage
          ]);
      }
code: protected function getPaginationData(Select $query, array $options)
      {
          // Get pagination options
          $page = (int) Arr::get($options, 'page');
  
          if ($page < 1) {
              $page = 1;
          }
  
          $resultsPerPage = Arr::get(
              $options,
              'resultsPerPage',
              $this->resultsPerPage
          );
  
          // Get total results
          $resultCount = $this->getQueryResultCount($query);
          $pageCount   = ceil($resultCount / $resultsPerPage);
  
          return new PaginationData([
              'page'             => $page,
              'page_count'       => $pageCount,
              'result_count'     => $resultCount,
              'results_per_page' => $resultsPerPage
          ]);
      }
code_tokens: protected function getPaginationData ( Select $ query , array $ options ) { // Get pagination options $ page = ( int ) Arr :: get ( $ options , 'page' ) ; if ( $ page < 1 ) { $ page = 1 ; } $ resultsPerPage = Arr :: get ( $ options , 'resultsPerPage' , $ this -> resultsPerPage ) ; // Get total results $ resultCount = $ this -> getQueryResultCount ( $ query ) ; $ pageCount = ceil ( $ resultCount / $ resultsPerPage ) ; return new PaginationData ( [ 'page' => $ page , 'page_count' => $ pageCount , 'result_count' => $ resultCount , 'results_per_page' => $ resultsPerPage ] ) ; }
docstring: Get data object with pagination data like page and page_count
  
  @param  Select $query
  @param  array $options
  @return PaginationData
docstring_tokens: Get data object with pagination data like page and page_count