NEW Setters in DebugViewFreindlyErrorFormatter are now chainable

This commit is contained in:
Robbie Averill 2018-07-04 11:02:21 +12:00
parent b2dd22fb50
commit d37551de34

View File

@ -48,10 +48,12 @@ class DebugViewFriendlyErrorFormatter implements FormatterInterface
* Set default status code * Set default status code
* *
* @param int $statusCode * @param int $statusCode
* @return $this
*/ */
public function setStatusCode($statusCode) public function setStatusCode($statusCode)
{ {
$this->statusCode = $statusCode; $this->statusCode = $statusCode;
return $this;
} }
/** /**
@ -68,10 +70,12 @@ class DebugViewFriendlyErrorFormatter implements FormatterInterface
* Set friendly title * Set friendly title
* *
* @param string $title * @param string $title
* @return $this
*/ */
public function setTitle($title) public function setTitle($title)
{ {
$this->friendlyErrorMessage = $title; $this->friendlyErrorMessage = $title;
return $this;
} }
/** /**
@ -88,10 +92,12 @@ class DebugViewFriendlyErrorFormatter implements FormatterInterface
* Set default error body * Set default error body
* *
* @param string $body * @param string $body
* @return $this
*/ */
public function setBody($body) public function setBody($body)
{ {
$this->friendlyErrorDetail = $body; $this->friendlyErrorDetail = $body;
return $this;
} }
public function format(array $record) public function format(array $record)