X-Git-Url: https://jfr.im/git/uguu.git/blobdiff_plain/f059e2cf1e0e2dafb07cdbf947cb333908239ec8..f0b5e51c8b74544ee25aeb33070f97b0d7a4fb9d:/src/Classes/Response.php diff --git a/src/Classes/Response.php b/src/Classes/Response.php index 7c2fe4f..678dff6 100644 --- a/src/Classes/Response.php +++ b/src/Classes/Response.php @@ -22,14 +22,14 @@ 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; } }