src/Valkyrja/Http/NativeRedirectResponse.php
public static function createRedirect(
        string $uri = null,
        int $status = StatusCode::FOUND,
        array $headers = []
    ): RedirectResponse {
        return new static('', $status, $headers, $uri);
    }
public static function createRedirect(
        string $uri = null,
        int $status = StatusCode::FOUND,
        array $headers = []
    ): RedirectResponse {
        return new static('', $status, $headers, $uri);
    }
Create a new redirect response.

@param string $uri     [optional] The URI to redirect to
@param int    $status  [optional] The response status code
@param array  $headers [optional] An array of response headers

@throws \InvalidArgumentException
@throws \Valkyrja\Http\Exceptions\InvalidStatusCodeException

@return \Valkyrja\Http\RedirectResponse