original_string: public function add($id, QueryBuilder $connection)
      {
          if (isset($this->connections[$id])) {
              throw new InvalidArgumentException('A connection with the ID "'.$id.'" already exists.');
          }
  
          $this->connections[$id] = $connection;
          $this->default = false;
  
          return $this;
      }
code: public function add($id, QueryBuilder $connection)
      {
          if (isset($this->connections[$id])) {
              throw new InvalidArgumentException('A connection with the ID "'.$id.'" already exists.');
          }
  
          $this->connections[$id] = $connection;
          $this->default = false;
  
          return $this;
      }
code_tokens: public function add ( $ id , QueryBuilder $ connection ) { if ( isset ( $ this -> connections [ $ id ] ) ) { throw new InvalidArgumentException ( 'A connection with the ID "' . $ id . '" already exists.' ) ; } $ this -> connections [ $ id ] = $ connection ; $ this -> default = false ; return $ this ; }
docstring: Adds a connection.
  
  @param string       $id
  @param QueryBuilder $connection
  
  @throws InvalidArgumentException if a connection with the given ID already exists
  
  @return $this
docstring_tokens: Adds a connection .