original_string: protected function encodeSetCookieHeader(ResponseInterface $response)
      {
          $cookies = CookieCollection::createFromHeader($response->getHeader('Set-Cookie'));
          $header = [];
          foreach ($cookies as $cookie) {
              if (in_array($cookie->getName(), $this->cookieNames, true)) {
                  $value = $this->_encrypt($cookie->getValue(), $this->cipherType);
                  $cookie = $cookie->withValue($value);
              }
              $header[] = $cookie->toHeaderValue();
          }
  
          return $response->withHeader('Set-Cookie', $header);
      }
code: protected function encodeSetCookieHeader(ResponseInterface $response)
      {
          $cookies = CookieCollection::createFromHeader($response->getHeader('Set-Cookie'));
          $header = [];
          foreach ($cookies as $cookie) {
              if (in_array($cookie->getName(), $this->cookieNames, true)) {
                  $value = $this->_encrypt($cookie->getValue(), $this->cipherType);
                  $cookie = $cookie->withValue($value);
              }
              $header[] = $cookie->toHeaderValue();
          }
  
          return $response->withHeader('Set-Cookie', $header);
      }
code_tokens: protected function encodeSetCookieHeader ( ResponseInterface $ response ) { $ cookies = CookieCollection :: createFromHeader ( $ response -> getHeader ( 'Set-Cookie' ) ) ; $ header = [ ] ; foreach ( $ cookies as $ cookie ) { if ( in_array ( $ cookie -> getName ( ) , $ this -> cookieNames , true ) ) { $ value = $ this -> _encrypt ( $ cookie -> getValue ( ) , $ this -> cipherType ) ; $ cookie = $ cookie -> withValue ( $ value ) ; } $ header [ ] = $ cookie -> toHeaderValue ( ) ; } return $ response -> withHeader ( 'Set-Cookie' , $ header ) ; }
docstring: Encode cookies from a response's Set-Cookie header
  
  @param \Psr\Http\Message\ResponseInterface $response The response to encode cookies in.
  @return \Psr\Http\Message\ResponseInterface Updated response with encoded cookies.
docstring_tokens: Encode cookies from a response s Set - Cookie header