original_string: protected function copy()
      {
          if ($this->isStale) {
              throw new \BadMethodCallException("Unable to modify a stale response object");
          }
          
          $response = clone $this;
          
          if ($this->isStale === false) {
              $this->status = new ResponseStatus($this->status);
              $this->headers = new Headers($this->getHeaders());
  
              $this->isStale = true;
          }
          
          return $response;
      }
code: protected function copy()
      {
          if ($this->isStale) {
              throw new \BadMethodCallException("Unable to modify a stale response object");
          }
          
          $response = clone $this;
          
          if ($this->isStale === false) {
              $this->status = new ResponseStatus($this->status);
              $this->headers = new Headers($this->getHeaders());
  
              $this->isStale = true;
          }
          
          return $response;
      }
code_tokens: protected function copy ( ) { if ( $ this -> isStale ) { throw new \ BadMethodCallException ( "Unable to modify a stale response object" ) ; } $ response = clone $ this ; if ( $ this -> isStale === false ) { $ this -> status = new ResponseStatus ( $ this -> status ) ; $ this -> headers = new Headers ( $ this -> getHeaders ( ) ) ; $ this -> isStale = true ; } return $ response ; }
docstring: Clone the response.
  Turn stale if the response is bound to the global environment.
  
  @return static  A non-stale response
  @throws \BadMethodCallException when the response is stale
docstring_tokens: Clone the response . Turn stale if the response is bound to the global environment .