original_string: public function paginate($perPage)
      {
          if (\filter_var($perPage, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]) && ! \is_bool($perPage)) {
              $this->perPage = $perPage;
              $this->paginate = true;
          } elseif (\filter_var($perPage, FILTER_VALIDATE_BOOLEAN)) {
              $this->perPage = null;
              $this->paginate = $perPage;
          } else {
              $this->perPage = null;
              $this->paginate = false;
          }
  
          return $this;
      }
code: public function paginate($perPage)
      {
          if (\filter_var($perPage, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]]) && ! \is_bool($perPage)) {
              $this->perPage = $perPage;
              $this->paginate = true;
          } elseif (\filter_var($perPage, FILTER_VALIDATE_BOOLEAN)) {
              $this->perPage = null;
              $this->paginate = $perPage;
          } else {
              $this->perPage = null;
              $this->paginate = false;
          }
  
          return $this;
      }
code_tokens: public function paginate ( $ perPage ) { if ( \ filter_var ( $ perPage , FILTER_VALIDATE_INT , [ 'options' => [ 'min_range' => 1 ] ] ) && ! \ is_bool ( $ perPage ) ) { $ this -> perPage = $ perPage ; $ this -> paginate = true ; } elseif ( \ filter_var ( $ perPage , FILTER_VALIDATE_BOOLEAN ) ) { $ this -> perPage = null ; $ this -> paginate = $ perPage ; } else { $ this -> perPage = null ; $ this -> paginate = false ; } return $ this ; }
docstring: Setup pagination.
  
  @param  bool|int|null  $perPage
  
  @return $this
docstring_tokens: Setup pagination .