From efed7d32367323717bcf3f653a0018f9dc35dd17 Mon Sep 17 00:00:00 2001
From: Oliver Klee <typo3-coding@oliverklee.de>
Date: Thu, 17 Nov 2022 09:03:01 +0100
Subject: [PATCH] [TASK] Annotate ActionController methods that never return

Extbase controllers that call a never-returning method do not
need a return statement after that call in order to avoid
calling the rest of the action method. The new annotations
ensure that PHPStan becomes aware of this control flow.

Resolves: #99109
Releases: main, 11.5
Change-Id: I9b9d308440966c71051fe993abd31f23b13c82e0
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76652
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
---
 typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php b/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
index f552168a1876..04de8128a4eb 100644
--- a/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
+++ b/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php
@@ -840,6 +840,7 @@ abstract class ActionController implements ControllerInterface
      * @param int $statusCode The HTTP status code
      * @param string $statusMessage A custom HTTP status message
      * @param string $content Body content which further explains the status
+     * @return never
      * @throws PropagateResponseException
      */
     public function throwStatus($statusCode, $statusMessage = null, $content = null)
-- 
GitLab