original_string: public function add(Cookie $cookie)
      {
          if ($cookie instanceof MutableCookie) {
              $this->cookies[$cookie->getName()] = $cookie;
          } elseif ($cookie instanceof ResponseCookie) {
              $this[$cookie->getName()]->set($cookie->get())
                  ->setPath($cookie->getPath())
                  ->setDomain($cookie->getDomain())
                  ->setSecure($cookie->isSecure())
                  ->setHttpOnly($cookie->isHttpOnly())
                  ->expiresAt($cookie->getExpiration());
          } else {
              $this->cookies[$cookie->getName()] = $this->setDefaults(
                  new MutableCookie($cookie->getName(), $cookie->get())
              );
          }
      }
code: public function add(Cookie $cookie)
      {
          if ($cookie instanceof MutableCookie) {
              $this->cookies[$cookie->getName()] = $cookie;
          } elseif ($cookie instanceof ResponseCookie) {
              $this[$cookie->getName()]->set($cookie->get())
                  ->setPath($cookie->getPath())
                  ->setDomain($cookie->getDomain())
                  ->setSecure($cookie->isSecure())
                  ->setHttpOnly($cookie->isHttpOnly())
                  ->expiresAt($cookie->getExpiration());
          } else {
              $this->cookies[$cookie->getName()] = $this->setDefaults(
                  new MutableCookie($cookie->getName(), $cookie->get())
              );
          }
      }
code_tokens: public function add ( Cookie $ cookie ) { if ( $ cookie instanceof MutableCookie ) { $ this -> cookies [ $ cookie -> getName ( ) ] = $ cookie ; } elseif ( $ cookie instanceof ResponseCookie ) { $ this [ $ cookie -> getName ( ) ] -> set ( $ cookie -> get ( ) ) -> setPath ( $ cookie -> getPath ( ) ) -> setDomain ( $ cookie -> getDomain ( ) ) -> setSecure ( $ cookie -> isSecure ( ) ) -> setHttpOnly ( $ cookie -> isHttpOnly ( ) ) -> expiresAt ( $ cookie -> getExpiration ( ) ) ; } else { $ this -> cookies [ $ cookie -> getName ( ) ] = $ this -> setDefaults ( new MutableCookie ( $ cookie -> getName ( ) , $ cookie -> get ( ) ) ) ; } }
docstring: Add a cookie to the pool.
  
  @param Cookie $cookie A cookie.
docstring_tokens: Add a cookie to the pool .