original_string: private function applyOffsetLimit($endPointUrl)
      {
          $endPointUrlArray = parse_url($endPointUrl);
  
          if (!isset($endPointUrlArray['query'])) {
              $endPointUrlArray['query'] = null;
          }
  
          parse_str($endPointUrlArray['query'], $queryStringArray);
  
          $queryStringArray['offset'] = $this->offset;
          $queryStringArray['limit'] = min(max(1, $this->limit), 500);
  
          $endPointUrlArray['query'] = http_build_query($queryStringArray, null, '&');
  
          $endPointUrl = (isset($endPointUrlArray['scheme'])) ? "{$endPointUrlArray['scheme']}://" : '';
          $endPointUrl.= (isset($endPointUrlArray['host'])) ? "{$endPointUrlArray['host']}" : '';
          $endPointUrl.= (isset($endPointUrlArray['port'])) ? ":{$endPointUrlArray['port']}" : '';
          $endPointUrl.= (isset($endPointUrlArray['path'])) ? "{$endPointUrlArray['path']}" : '';
          $endPointUrl.= (isset($endPointUrlArray['query'])) ? "?{$endPointUrlArray['query']}" : '';
  
          return $endPointUrl;
      }
code: private function applyOffsetLimit($endPointUrl)
      {
          $endPointUrlArray = parse_url($endPointUrl);
  
          if (!isset($endPointUrlArray['query'])) {
              $endPointUrlArray['query'] = null;
          }
  
          parse_str($endPointUrlArray['query'], $queryStringArray);
  
          $queryStringArray['offset'] = $this->offset;
          $queryStringArray['limit'] = min(max(1, $this->limit), 500);
  
          $endPointUrlArray['query'] = http_build_query($queryStringArray, null, '&');
  
          $endPointUrl = (isset($endPointUrlArray['scheme'])) ? "{$endPointUrlArray['scheme']}://" : '';
          $endPointUrl.= (isset($endPointUrlArray['host'])) ? "{$endPointUrlArray['host']}" : '';
          $endPointUrl.= (isset($endPointUrlArray['port'])) ? ":{$endPointUrlArray['port']}" : '';
          $endPointUrl.= (isset($endPointUrlArray['path'])) ? "{$endPointUrlArray['path']}" : '';
          $endPointUrl.= (isset($endPointUrlArray['query'])) ? "?{$endPointUrlArray['query']}" : '';
  
          return $endPointUrl;
      }
code_tokens: private function applyOffsetLimit ( $ endPointUrl ) { $ endPointUrlArray = parse_url ( $ endPointUrl ) ; if ( ! isset ( $ endPointUrlArray [ 'query' ] ) ) { $ endPointUrlArray [ 'query' ] = null ; } parse_str ( $ endPointUrlArray [ 'query' ] , $ queryStringArray ) ; $ queryStringArray [ 'offset' ] = $ this -> offset ; $ queryStringArray [ 'limit' ] = min ( max ( 1 , $ this -> limit ) , 500 ) ; $ endPointUrlArray [ 'query' ] = http_build_query ( $ queryStringArray , null , '&' ) ; $ endPointUrl = ( isset ( $ endPointUrlArray [ 'scheme' ] ) ) ? "{$endPointUrlArray['scheme']}://" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'host' ] ) ) ? "{$endPointUrlArray['host']}" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'port' ] ) ) ? ":{$endPointUrlArray['port']}" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'path' ] ) ) ? "{$endPointUrlArray['path']}" : '' ; $ endPointUrl .= ( isset ( $ endPointUrlArray [ 'query' ] ) ) ? "?{$endPointUrlArray['query']}" : '' ; return $ endPointUrl ; }
docstring: Apply offset and limit to a end point URL.
  @param mixed $endPointUrl
  @return string
docstring_tokens: Apply offset and limit to a end point URL .