mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
chore: Make parameter name more explicit
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
42c5a60c29
commit
90a948506b
1 changed files with 3 additions and 3 deletions
|
|
@ -21,9 +21,9 @@ class ApiHelper {
|
|||
/**
|
||||
* Respond to a call
|
||||
* @psalm-taint-escape html
|
||||
* @param int $httpStatusCode force the HTTP status code, only used for the special case of maintenance mode which return 503 even for v1
|
||||
* @param int $overrideHttpStatusCode force the HTTP status code, only used for the special case of maintenance mode which return 503 even for v1
|
||||
*/
|
||||
public static function respond(int $statusCode, string $statusMessage, array $headers = [], ?int $httpStatusCode = null): void {
|
||||
public static function respond(int $statusCode, string $statusMessage, array $headers = [], ?int $overrideHttpStatusCode = null): void {
|
||||
$request = Server::get(IRequest::class);
|
||||
$format = $request->getParam('format', 'xml');
|
||||
if (self::isV2($request)) {
|
||||
|
|
@ -47,7 +47,7 @@ class ApiHelper {
|
|||
header($name . ': ' . $value);
|
||||
}
|
||||
|
||||
http_response_code($httpStatusCode ?? $response->getStatus());
|
||||
http_response_code($overrideHttpStatusCode ?? $response->getStatus());
|
||||
|
||||
self::setContentType($format);
|
||||
$body = $response->render();
|
||||
|
|
|
|||
Loading…
Reference in a new issue