original_string: public function run()
      {
          /** @var ResponseInterface $response */
          $response = $this->queue->handle($this->request);
  
          // http status
          $reasonPhrase = $response->getReasonPhrase();
          $reasonPhrase = ($reasonPhrase ? ' '.$reasonPhrase : '');
          header(sprintf('HTTP/%s %d%s', $response->getProtocolVersion(), $response->getStatusCode(), $reasonPhrase));
  
          // additional headers
          foreach ($response->getHeaders() as $header => $values) {
              $first = true;
              foreach ($values as $value) {
                  header(sprintf('%s: %s', $header, $value), $first);
                  $first = false;
              }
          }
          echo $response->getBody();
      }
code: public function run()
      {
          /** @var ResponseInterface $response */
          $response = $this->queue->handle($this->request);
  
          // http status
          $reasonPhrase = $response->getReasonPhrase();
          $reasonPhrase = ($reasonPhrase ? ' '.$reasonPhrase : '');
          header(sprintf('HTTP/%s %d%s', $response->getProtocolVersion(), $response->getStatusCode(), $reasonPhrase));
  
          // additional headers
          foreach ($response->getHeaders() as $header => $values) {
              $first = true;
              foreach ($values as $value) {
                  header(sprintf('%s: %s', $header, $value), $first);
                  $first = false;
              }
          }
          echo $response->getBody();
      }
code_tokens: public function run ( ) { /** @var ResponseInterface $response */ $ response = $ this -> queue -> handle ( $ this -> request ) ; // http status $ reasonPhrase = $ response -> getReasonPhrase ( ) ; $ reasonPhrase = ( $ reasonPhrase ? ' ' . $ reasonPhrase : '' ) ; header ( sprintf ( 'HTTP/%s %d%s' , $ response -> getProtocolVersion ( ) , $ response -> getStatusCode ( ) , $ reasonPhrase ) ) ; // additional headers foreach ( $ response -> getHeaders ( ) as $ header => $ values ) { $ first = true ; foreach ( $ values as $ value ) { header ( sprintf ( '%s: %s' , $ header , $ value ) , $ first ) ; $ first = false ; } } echo $ response -> getBody ( ) ; }
docstring: run a http based application
docstring_tokens: run a http based application