1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-10 07:06:40 +02:00

Return self from NativeMailerHandler::addHeader().

NativeMailerHandler::setContentType() and NativeMailerHandler::setEncoding()
both return the NativeMailerHandler object, allowing a fluent coding
style.  This fix adds the same behaviour to NativeMailerHandler::addHeader()
for so that all public non-inherited methods behave this way for
consistency.
This commit is contained in:
Liam O'Boyle
2015-03-03 11:47:28 +11:00
parent 1b34cd4d88
commit 42ea303cfe

View File

@@ -78,7 +78,7 @@ class NativeMailerHandler extends MailHandler
* Add headers to the message * Add headers to the message
* *
* @param string|array $headers Custom added headers * @param string|array $headers Custom added headers
* @return null * @return self
*/ */
public function addHeader($headers) public function addHeader($headers)
{ {
@@ -88,6 +88,8 @@ class NativeMailerHandler extends MailHandler
} }
$this->headers[] = $header; $this->headers[] = $header;
} }
return $this;
} }
/** /**