X-Git-Url: https://jfr.im/git/uguu.git/blobdiff_plain/cec6349edd312760946ab1490ab5e037297a1ad6..f0b5e51c8b74544ee25aeb33070f97b0d7a4fb9d:/src/Classes/Response.php diff --git a/src/Classes/Response.php b/src/Classes/Response.php index a2ef5f9..678dff6 100644 --- a/src/Classes/Response.php +++ b/src/Classes/Response.php @@ -18,18 +18,18 @@ * along with this program. If not, see . */ - namespace Uguu\Classes; + namespace Pomf\Uguu\Classes; class Response { - public mixed $type; + public string $type; /** * Takes a string as an argument and sets the header to the appropriate content type * * @param $response_type string The type of response you want to return. Valid options are: csv, html, json, text. */ - public function __construct(string $response_type = "json") + public function __construct(string $response_type) { switch ($response_type) { case 'csv': @@ -55,7 +55,6 @@ default: header('Content-Type: application/json; charset=UTF-8'); $this->type = 'json'; - $this->error(400, 'Invalid response type. Valid options are: csv, html, json, text.'); break; } }