@@ -470,9 +470,8 @@ public function setLayout(string|bool $layout): static
470470
471471 /**
472472 * @throws Nette\Application\AbortException
473- * @return never
474473 */
475- public function sendTemplate (?Template $ template = null ): void
474+ public function sendTemplate (?Template $ template = null ): never
476475 {
477476 $ template ??= $ this ->getTemplate ();
478477 if (!$ template ->getFile ()) {
@@ -644,9 +643,8 @@ public function isAjax(): bool
644643 /**
645644 * Sends AJAX payload to the output.
646645 * @throws Nette\Application\AbortException
647- * @return never
648646 */
649- public function sendPayload (): void
647+ public function sendPayload (): never
650648 {
651649 $ this ->sendResponse (new Responses \JsonResponse ($ this ->getPayload ()));
652650 }
@@ -655,9 +653,8 @@ public function sendPayload(): void
655653 /**
656654 * Sends JSON data to the output.
657655 * @throws Nette\Application\AbortException
658- * @return never
659656 */
660- public function sendJson (mixed $ data ): void
657+ public function sendJson (mixed $ data ): never
661658 {
662659 $ this ->sendResponse (new Responses \JsonResponse ($ data ));
663660 }
@@ -669,9 +666,8 @@ public function sendJson(mixed $data): void
669666 /**
670667 * Sends response and terminates presenter.
671668 * @throws Nette\Application\AbortException
672- * @return never
673669 */
674- public function sendResponse (Application \Response $ response ): void
670+ public function sendResponse (Application \Response $ response ): never
675671 {
676672 $ this ->response = $ response ;
677673 $ this ->terminate ();
@@ -681,9 +677,8 @@ public function sendResponse(Application\Response $response): void
681677 /**
682678 * Correctly terminates presenter.
683679 * @throws Nette\Application\AbortException
684- * @return never
685680 */
686- public function terminate (): void
681+ public function terminate (): never
687682 {
688683 throw new Application \AbortException ;
689684 }
@@ -693,9 +688,8 @@ public function terminate(): void
693688 * Forward to another presenter or action.
694689 * @param array|mixed $args
695690 * @throws Nette\Application\AbortException
696- * @return never
697691 */
698- public function forward (string |Nette \Application \Request $ destination , $ args = []): void
692+ public function forward (string |Nette \Application \Request $ destination , $ args = []): never
699693 {
700694 if ($ destination instanceof Application \Request) {
701695 $ this ->sendResponse (new Responses \ForwardResponse ($ destination ));
@@ -712,9 +706,8 @@ public function forward(string|Nette\Application\Request $destination, $args = [
712706 /**
713707 * Redirect to another URL and ends presenter execution.
714708 * @throws Nette\Application\AbortException
715- * @return never
716709 */
717- public function redirectUrl (string $ url , ?int $ httpCode = null ): void
710+ public function redirectUrl (string $ url , ?int $ httpCode = null ): never
718711 {
719712 if ($ this ->isAjax ()) {
720713 $ this ->getPayload ()->redirect = $ url ;
0 commit comments