original_string: protected function emitHeaders(ResponseInterface $response)
      {
          $normalize = function ($headerName) {
              $name     = str_replace('-', ' ', $headerName);
              $filtered = str_replace(' ', '-', ucwords($name));
  
              return $filtered;
          };
          foreach ($response->getHeaders() as $headerName => $values) {
              $name  = $normalize($headerName);
              $first = true;
              foreach ($values as $value) {
                  header(sprintf(
                      '%s: %s',
                      $name,
                      $value
                  ), $first);
                  $first = false;
              }
          }
  
          return $this;
      }
code: protected function emitHeaders(ResponseInterface $response)
      {
          $normalize = function ($headerName) {
              $name     = str_replace('-', ' ', $headerName);
              $filtered = str_replace(' ', '-', ucwords($name));
  
              return $filtered;
          };
          foreach ($response->getHeaders() as $headerName => $values) {
              $name  = $normalize($headerName);
              $first = true;
              foreach ($values as $value) {
                  header(sprintf(
                      '%s: %s',
                      $name,
                      $value
                  ), $first);
                  $first = false;
              }
          }
  
          return $this;
      }
code_tokens: protected function emitHeaders ( ResponseInterface $ response ) { $ normalize = function ( $ headerName ) { $ name = str_replace ( '-' , ' ' , $ headerName ) ; $ filtered = str_replace ( ' ' , '-' , ucwords ( $ name ) ) ; return $ filtered ; } ; foreach ( $ response -> getHeaders ( ) as $ headerName => $ values ) { $ name = $ normalize ( $ headerName ) ; $ first = true ; foreach ( $ values as $ value ) { header ( sprintf ( '%s: %s' , $ name , $ value ) , $ first ) ; $ first = false ; } } return $ this ; }
docstring: Emits headers.
  
  @param \Psr\Http\Message\ResponseInterface $response The response
  
  @return self
docstring_tokens: Emits headers .