src/Controllers/HailController.php
public function makeJsonReponse($status_code, $body)
    {
        $this->getResponse()->setBody(json_encode($body, JSON_UNESCAPED_SLASHES));
        $this->getResponse()->setStatusCode($status_code);
        $this->getResponse()->addHeader("Content-type", "application/json");

        return $this->getResponse();
    }
public function makeJsonReponse($status_code, $body)
    {
        $this->getResponse()->setBody(json_encode($body, JSON_UNESCAPED_SLASHES));
        $this->getResponse()->setStatusCode($status_code);
        $this->getResponse()->addHeader("Content-type", "application/json");

        return $this->getResponse();
    }
public function makeJsonReponse ( $ status_code , $ body ) { $ this -> getResponse ( ) -> setBody ( json_encode ( $ body , JSON_UNESCAPED_SLASHES ) ) ; $ this -> getResponse ( ) -> setStatusCode ( $ status_code ) ; $ this -> getResponse ( ) -> addHeader ( "Content-type" , "application/json" ) ; return $ this -> getResponse ( ) ; }
Make the JSON response

@param int $status_code HTTP status code to return
@param array|null $body JSON body of the request

@return HTTPResponse JSON response
Make the JSON response