original_string: public function paginate($perPage = 15)
      {
          $paginator = Paginator::make($this->items, count($this->items), $perPage);
  
          $start = ($paginator->getFactory()->getCurrentPage() - 1) * $perPage;
          $sliced = array_slice($this->items, $start, $perPage);
  
          return Paginator::make($sliced, count($this->items), $perPage);
      }
code: public function paginate($perPage = 15)
      {
          $paginator = Paginator::make($this->items, count($this->items), $perPage);
  
          $start = ($paginator->getFactory()->getCurrentPage() - 1) * $perPage;
          $sliced = array_slice($this->items, $start, $perPage);
  
          return Paginator::make($sliced, count($this->items), $perPage);
      }
code_tokens: public function paginate ( $ perPage = 15 ) { $ paginator = Paginator :: make ( $ this -> items , count ( $ this -> items ) , $ perPage ) ; $ start = ( $ paginator -> getFactory ( ) -> getCurrentPage ( ) - 1 ) * $ perPage ; $ sliced = array_slice ( $ this -> items , $ start , $ perPage ) ; return Paginator :: make ( $ sliced , count ( $ this -> items ) , $ perPage ) ; }
docstring: Paginates the Elasticsearch results.
  
  @param int $perPage
  @return mixed
docstring_tokens: Paginates the Elasticsearch results .