@@ -65,11 +65,17 @@ |
||
| 65 | 65 | { |
| 66 | 66 | http_response_code($this->code ?? 200); |
| 67 | 67 | |
| 68 | - if ($this->json) header('Content-Type: application/json'); |
|
| 68 | + if ($this->json) { |
|
| 69 | + header('Content-Type: application/json'); |
|
| 70 | + } |
|
| 69 | 71 | |
| 70 | - if ($this->data !== null) echo !$this->json ? $this->data : json_encode($this->data, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); |
|
| 72 | + if ($this->data !== null) { |
|
| 73 | + echo !$this->json ? $this->data : json_encode($this->data, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); |
|
| 74 | + } |
|
| 71 | 75 | |
| 72 | - if ($exit) exit(EXIT_SUCCESS); |
|
| 76 | + if ($exit) { |
|
| 77 | + exit(EXIT_SUCCESS); |
|
| 78 | + } |
|
| 73 | 79 | } |
| 74 | 80 | } |
| 75 | 81 | ?> |