Skip to content

Commit

Permalink
SpecialResponses become final
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsunet committed Jan 27, 2024
1 parent fadf82b commit e90601a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Classes/Mvc/Controller/SpecialResponsesSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trait SpecialResponsesSupport
* @return never
* @throws StopActionException
*/
protected function responseThrowsStatus(int $statusCode, string $content = '', ?ActionResponse $response = null): never
final protected function responseThrowsStatus(int $statusCode, string $content = '', ?ActionResponse $response = null): never
{
$response = $response ?? new ActionResponse;

Expand All @@ -43,7 +43,7 @@ protected function responseThrowsStatus(int $statusCode, string $content = '', ?
* @return ActionResponse
* @throws StopActionException
*/
protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int $statusCode = 303, ?ActionResponse $response = null): ActionResponse
final protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int $statusCode = 303, ?ActionResponse $response = null): ActionResponse
{
$nextResponse = $response !== null ? clone $response : new ActionResponse();

Expand All @@ -53,7 +53,7 @@ protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int
}

$nextResponse->setStatusCode($statusCode);
$content = sprintf('<html><head><meta http-equiv="refresh" content="%u;url=%s"/></head></html>', $delay, $uri);
$content = sprintf('<html lang="en"><head><meta http-equiv="refresh" content="%u;url=%s"/><title>Redirect to %s</title></head></html>', $delay, $uri, $uri);
$nextResponse->setContent($content);
return $nextResponse;
}
Expand All @@ -64,7 +64,7 @@ protected function responseRedirectsToUri(UriInterface $uri, int $delay = 0, int
* @return never
* @throws StopActionException
*/
protected function throwStopActionWithResponse(ActionResponse $response, string $details = ''): never
final protected function throwStopActionWithResponse(ActionResponse $response, string $details = ''): never
{
throw StopActionException::createForResponse($response, $details);
}
Expand All @@ -80,7 +80,7 @@ protected function throwStopActionWithResponse(ActionResponse $response, string
* @return never
* @throws ForwardException
*/
protected function forwardToRequest(ActionRequest $request): never
final protected function forwardToRequest(ActionRequest $request): never
{
$nextRequest = clone $request;
throw ForwardException::createForNextRequest($nextRequest, '');
Expand Down

0 comments on commit e90601a

Please sign in to comment.