original_string: public function store(Response $response, $url)
      {
          $host = parse_url($url, PHP_URL_HOST);
          $path = parse_url($url, PHP_URL_PATH);
          $path = $path ?: '/';
  
          $header = $response->getHeader('Set-Cookie');
          $cookies = $this->parseSetCookieHeader($header);
          $cookies = $this->setRequestDefaults($cookies, $host, $path);
          foreach ($cookies as $cookie) {
              $this->cookies[$cookie->getId()] = $cookie;
          }
          $this->removeExpiredCookies($host, $path);
      }
code: public function store(Response $response, $url)
      {
          $host = parse_url($url, PHP_URL_HOST);
          $path = parse_url($url, PHP_URL_PATH);
          $path = $path ?: '/';
  
          $header = $response->getHeader('Set-Cookie');
          $cookies = $this->parseSetCookieHeader($header);
          $cookies = $this->setRequestDefaults($cookies, $host, $path);
          foreach ($cookies as $cookie) {
              $this->cookies[$cookie->getId()] = $cookie;
          }
          $this->removeExpiredCookies($host, $path);
      }
code_tokens: public function store ( Response $ response , $ url ) { $ host = parse_url ( $ url , PHP_URL_HOST ) ; $ path = parse_url ( $ url , PHP_URL_PATH ) ; $ path = $ path ? : '/' ; $ header = $ response -> getHeader ( 'Set-Cookie' ) ; $ cookies = $ this -> parseSetCookieHeader ( $ header ) ; $ cookies = $ this -> setRequestDefaults ( $ cookies , $ host , $ path ) ; foreach ( $ cookies as $ cookie ) { $ this -> cookies [ $ cookie -> getId ( ) ] = $ cookie ; } $ this -> removeExpiredCookies ( $ host , $ path ) ; }
docstring: Store the cookies from a response.
  
  Store the cookies that haven't expired. If a cookie has been expired
  and is currently stored, it will be removed.
  
  @param Response $response The response to read cookies from
  @param string $url The request URL used for default host/path values.
  @return void
docstring_tokens: Store the cookies from a response .