original_string: protected function withHeaderLogic($name, $value, $add)
      {
          $this->assertHeaderName($name);
          $this->assertHeaderValue($value);
          $this->assertHeadersNotSent();
          
          foreach ((array)$value as $val) {
              $this->header("{$name}: {$val}", !$add);
          }
          
          return $this;
      }
code: protected function withHeaderLogic($name, $value, $add)
      {
          $this->assertHeaderName($name);
          $this->assertHeaderValue($value);
          $this->assertHeadersNotSent();
          
          foreach ((array)$value as $val) {
              $this->header("{$name}: {$val}", !$add);
          }
          
          return $this;
      }
code_tokens: protected function withHeaderLogic ( $ name , $ value , $ add ) { $ this -> assertHeaderName ( $ name ) ; $ this -> assertHeaderValue ( $ value ) ; $ this -> assertHeadersNotSent ( ) ; foreach ( ( array ) $ value as $ val ) { $ this -> header ( "{$name}: {$val}" , ! $ add ) ; } return $ this ; }
docstring: Abstraction for `withHeader` and `withAddedHeader`
  
  @param string $name Case-insensitive header field name.
  @param string|string[] $value Header value(s).
  @param boolean $add
  @return static
  @throws \InvalidArgumentException for invalid header names or values.
  @throws \RuntimeException if headers are already sent
docstring_tokens: Abstraction for withHeader and withAddedHeader