original_string: public function withCookieCollection(CookieCollection $cookies)
      {
          $new = clone $this;
          $values = [];
          foreach ($cookies as $cookie) {
              $values[$cookie->getName()] = $cookie->getValue();
          }
          $new->cookies = $values;
  
          return $new;
      }
code: public function withCookieCollection(CookieCollection $cookies)
      {
          $new = clone $this;
          $values = [];
          foreach ($cookies as $cookie) {
              $values[$cookie->getName()] = $cookie->getValue();
          }
          $new->cookies = $values;
  
          return $new;
      }
code_tokens: public function withCookieCollection ( CookieCollection $ cookies ) { $ new = clone $ this ; $ values = [ ] ; foreach ( $ cookies as $ cookie ) { $ values [ $ cookie -> getName ( ) ] = $ cookie -> getValue ( ) ; } $ new -> cookies = $ values ; return $ new ; }
docstring: Replace the cookies in the request with those contained in
  the provided CookieCollection.
  
  @param \Cake\Http\Cookie\CookieCollection $cookies The cookie collection
  @return static
docstring_tokens: Replace the cookies in the request with those contained in the provided CookieCollection .