($payload, int $status = 200)
| 34 | restore_error_handler(); |
| 35 | } |
| 36 | private function out($payload, int $status = 200): void |
| 37 | { |
| 38 | http_response_code($status); |
| 39 | echo json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); |
| 40 | } |
| 41 | private function readJson(): array |
| 42 | { |
| 43 | $raw = file_get_contents('php://input'); |
no outgoing calls
no test coverage detected