@@ -498,9 +498,8 @@ public function setLayout(string|bool $layout): static
498498
499499 /**
500500 * @throws Nette\Application\AbortException
501- * @return never
502501 */
503- public function sendTemplate (?Template $ template = null ): void
502+ public function sendTemplate (?Template $ template = null ): never
504503 {
505504 $ template ??= $ this ->getTemplate ();
506505 if (!$ template ->getFile ()) {
@@ -670,9 +669,8 @@ public function isAjax(): bool
670669 /**
671670 * Sends AJAX payload to the output.
672671 * @throws Nette\Application\AbortException
673- * @return never
674672 */
675- public function sendPayload (): void
673+ public function sendPayload (): never
676674 {
677675 $ this ->sendResponse (new Responses \JsonResponse ($ this ->getPayload ()));
678676 }
@@ -681,9 +679,8 @@ public function sendPayload(): void
681679 /**
682680 * Sends JSON data to the output.
683681 * @throws Nette\Application\AbortException
684- * @return never
685682 */
686- public function sendJson (mixed $ data ): void
683+ public function sendJson (mixed $ data ): never
687684 {
688685 $ this ->sendResponse (new Responses \JsonResponse ($ data ));
689686 }
@@ -695,9 +692,8 @@ public function sendJson(mixed $data): void
695692 /**
696693 * Sends response and terminates presenter.
697694 * @throws Nette\Application\AbortException
698- * @return never
699695 */
700- public function sendResponse (Application \Response $ response ): void
696+ public function sendResponse (Application \Response $ response ): never
701697 {
702698 $ this ->response = $ response ;
703699 $ this ->terminate ();
@@ -707,9 +703,8 @@ public function sendResponse(Application\Response $response): void
707703 /**
708704 * Correctly terminates presenter.
709705 * @throws Nette\Application\AbortException
710- * @return never
711706 */
712- public function terminate (): void
707+ public function terminate (): never
713708 {
714709 throw new Application \AbortException ;
715710 }
@@ -719,9 +714,8 @@ public function terminate(): void
719714 * Forward to another presenter or action.
720715 * @param array|mixed $args
721716 * @throws Nette\Application\AbortException
722- * @return never
723717 */
724- public function forward (string |Nette \Application \Request $ destination , $ args = []): void
718+ public function forward (string |Nette \Application \Request $ destination , $ args = []): never
725719 {
726720 if ($ destination instanceof Application \Request) {
727721 $ this ->sendResponse (new Responses \ForwardResponse ($ destination ));
@@ -738,9 +732,8 @@ public function forward(string|Nette\Application\Request $destination, $args = [
738732 /**
739733 * Redirect to another URL and ends presenter execution.
740734 * @throws Nette\Application\AbortException
741- * @return never
742735 */
743- public function redirectUrl (string $ url , ?int $ httpCode = null ): void
736+ public function redirectUrl (string $ url , ?int $ httpCode = null ): never
744737 {
745738 if ($ this ->isAjax ()) {
746739 $ this ->getPayload ()->redirect = $ url ;
0 commit comments