original_string: public function setParams(array $params)
  	{
  		$this->path = [];
  		$this->query = [];
  		
  		foreach($params as $k => $v)
  		{
  			if(is_integer($k))
  			{
  				if(array_key_exists($k, $this->pathParamNames))
  				{
  					$this->path[$this->pathParamNames[$k]] = $v;
  					
  					continue;
  				}
  				
  				throw new \OutOfBoundsException(sprintf('No path param at position %u', $k));
  			}
  			
  			if(in_array($k, $this->pathParamNames, true))
  			{
  				$this->path[$k] = $v;
  				
  				continue;
  			}
  			
  			$this->query[$k] = $v;
  		}
  		
  		return $this;
  	}
code: public function setParams(array $params)
  	{
  		$this->path = [];
  		$this->query = [];
  		
  		foreach($params as $k => $v)
  		{
  			if(is_integer($k))
  			{
  				if(array_key_exists($k, $this->pathParamNames))
  				{
  					$this->path[$this->pathParamNames[$k]] = $v;
  					
  					continue;
  				}
  				
  				throw new \OutOfBoundsException(sprintf('No path param at position %u', $k));
  			}
  			
  			if(in_array($k, $this->pathParamNames, true))
  			{
  				$this->path[$k] = $v;
  				
  				continue;
  			}
  			
  			$this->query[$k] = $v;
  		}
  		
  		return $this;
  	}
code_tokens: public function setParams ( array $ params ) { $ this -> path = [ ] ; $ this -> query = [ ] ; foreach ( $ params as $ k => $ v ) { if ( is_integer ( $ k ) ) { if ( array_key_exists ( $ k , $ this -> pathParamNames ) ) { $ this -> path [ $ this -> pathParamNames [ $ k ] ] = $ v ; continue ; } throw new \ OutOfBoundsException ( sprintf ( 'No path param at position %u' , $ k ) ) ; } if ( in_array ( $ k , $ this -> pathParamNames , true ) ) { $ this -> path [ $ k ] = $ v ; continue ; } $ this -> query [ $ k ] = $ v ; } return $ this ; }
docstring: Removes all param values from path and query and re-populates using the given values.
  
  @param array<string, mixed> $params Path and query params to be set.
  @return UriBuilder
docstring_tokens: Removes all param values from path and query and re - populates using the given values .