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