@@ -472,9 +472,8 @@ public function setLayout(string|bool $layout): static
472472
473473 /**
474474 * @throws Nette\Application\AbortException
475- * @return never
476475 */
477- public function sendTemplate (?Template $ template = null ): void
476+ public function sendTemplate (?Template $ template = null ): never
478477 {
479478 $ template ??= $ this ->getTemplate ();
480479 if (!$ template ->getFile ()) {
@@ -646,9 +645,8 @@ public function isAjax(): bool
646645 /**
647646 * Sends AJAX payload to the output.
648647 * @throws Nette\Application\AbortException
649- * @return never
650648 */
651- public function sendPayload (): void
649+ public function sendPayload (): never
652650 {
653651 $ this ->sendResponse (new Responses \JsonResponse ($ this ->getPayload ()));
654652 }
@@ -657,9 +655,8 @@ public function sendPayload(): void
657655 /**
658656 * Sends JSON data to the output.
659657 * @throws Nette\Application\AbortException
660- * @return never
661658 */
662- public function sendJson (mixed $ data ): void
659+ public function sendJson (mixed $ data ): never
663660 {
664661 $ this ->sendResponse (new Responses \JsonResponse ($ data ));
665662 }
@@ -671,9 +668,8 @@ public function sendJson(mixed $data): void
671668 /**
672669 * Sends response and terminates presenter.
673670 * @throws Nette\Application\AbortException
674- * @return never
675671 */
676- public function sendResponse (Application \Response $ response ): void
672+ public function sendResponse (Application \Response $ response ): never
677673 {
678674 $ this ->response = $ response ;
679675 $ this ->terminate ();
@@ -683,9 +679,8 @@ public function sendResponse(Application\Response $response): void
683679 /**
684680 * Correctly terminates presenter.
685681 * @throws Nette\Application\AbortException
686- * @return never
687682 */
688- public function terminate (): void
683+ public function terminate (): never
689684 {
690685 throw new Application \AbortException ;
691686 }
@@ -695,9 +690,8 @@ public function terminate(): void
695690 * Forward to another presenter or action.
696691 * @param array|mixed $args
697692 * @throws Nette\Application\AbortException
698- * @return never
699693 */
700- public function forward (string |Nette \Application \Request $ destination , $ args = []): void
694+ public function forward (string |Nette \Application \Request $ destination , $ args = []): never
701695 {
702696 if ($ destination instanceof Application \Request) {
703697 $ this ->sendResponse (new Responses \ForwardResponse ($ destination ));
@@ -714,9 +708,8 @@ public function forward(string|Nette\Application\Request $destination, $args = [
714708 /**
715709 * Redirect to another URL and ends presenter execution.
716710 * @throws Nette\Application\AbortException
717- * @return never
718711 */
719- public function redirectUrl (string $ url , ?int $ httpCode = null ): void
712+ public function redirectUrl (string $ url , ?int $ httpCode = null ): never
720713 {
721714 if ($ this ->isAjax ()) {
722715 $ this ->getPayload ()->redirect = $ url ;
0 commit comments