original_string: public function addCookie(CookieInterface $cookie)
      {
          if (!$cookie->getDomain() || !$cookie->getPath()) {
              throw new InvalidArgumentException('Cookie must have a domain and a path set.');
          }
          $this->_cookies = $this->_cookies->add($cookie);
  
          return $this;
      }
code: public function addCookie(CookieInterface $cookie)
      {
          if (!$cookie->getDomain() || !$cookie->getPath()) {
              throw new InvalidArgumentException('Cookie must have a domain and a path set.');
          }
          $this->_cookies = $this->_cookies->add($cookie);
  
          return $this;
      }
code_tokens: public function addCookie ( CookieInterface $ cookie ) { if ( ! $ cookie -> getDomain ( ) || ! $ cookie -> getPath ( ) ) { throw new InvalidArgumentException ( 'Cookie must have a domain and a path set.' ) ; } $ this -> _cookies = $ this -> _cookies -> add ( $ cookie ) ; return $ this ; }
docstring: Adds a cookie to the Client collection.
  
  @param \Cake\Http\Cookie\CookieInterface $cookie Cookie object.
  @return $this
docstring_tokens: Adds a cookie to the Client collection .