original_string: public function addHeader($key, $value) {
      if (!is_string($key)) {
        $error = sprintf("Header key is not a string (Actual type: %s).",
                         gettype($key));
        throw new \InvalidArgumentException($error);
      }
      $this->addHeaderArray(array($key => $value));
    }
code: public function addHeader($key, $value) {
      if (!is_string($key)) {
        $error = sprintf("Header key is not a string (Actual type: %s).",
                         gettype($key));
        throw new \InvalidArgumentException($error);
      }
      $this->addHeaderArray(array($key => $value));
    }
code_tokens: public function addHeader ( $ key , $ value ) { if ( ! is_string ( $ key ) ) { $ error = sprintf ( "Header key is not a string (Actual type: %s)." , gettype ( $ key ) ) ; throw new \ InvalidArgumentException ( $ error ) ; } $ this -> addHeaderArray ( array ( $ key => $ value ) ) ; }
docstring: Adds a header pair to the mail object.
  
  @param string $key Header name (from the whitelist) to be added.
  @param string $value Header value to be added.
  @throws \InvalidArgumentException If the header is not on the whitelist, or
  if the header is invalid (i.e. not a string).
docstring_tokens: Adds a header pair to the mail object .