diff --git a/system/API/ResponseTrait.php b/system/API/ResponseTrait.php index 1c77d0a173fe..36d00389628c 100644 --- a/system/API/ResponseTrait.php +++ b/system/API/ResponseTrait.php @@ -118,19 +118,16 @@ public function respond($data = null, int $status = null, string $message = '') { if ($this->format === 'json') { - return $this->response->setJSON($output) - ->setStatusCode($status, $message); + return $this->response->setJSON($output)->setStatusCode($status, $message); } if ($this->format === 'xml') { - return $this->response->setXML($output) - ->setStatusCode($status, $message); + return $this->response->setXML($output)->setStatusCode($status, $message); } } - return $this->response->setBody($output) - ->setStatusCode($status, $message); + return $this->response->setBody($output)->setStatusCode($status, $message); } //--------------------------------------------------------------------