diff --git a/system/Controller.php b/system/Controller.php index fc0c41bf18fa..9c6e7ee36a63 100644 --- a/system/Controller.php +++ b/system/Controller.php @@ -15,6 +15,7 @@ use CodeIgniter\HTTP\CLIRequest; use CodeIgniter\HTTP\Exceptions\HTTPException; +use CodeIgniter\HTTP\Exceptions\RedirectException; use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; @@ -77,7 +78,7 @@ class Controller * * @return void * - * @throws HTTPException + * @throws HTTPException|RedirectException */ public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { @@ -105,7 +106,7 @@ public function initController(RequestInterface $request, ResponseInterface $res * * @return void * - * @throws HTTPException + * @throws HTTPException|RedirectException */ protected function forceHTTPS(int $duration = 31_536_000) { diff --git a/utils/phpstan-baseline/catch.neverThrown.neon b/utils/phpstan-baseline/catch.neverThrown.neon deleted file mode 100644 index 1d590a78fac2..000000000000 --- a/utils/phpstan-baseline/catch.neverThrown.neon +++ /dev/null @@ -1,8 +0,0 @@ -# total 1 error - -parameters: - ignoreErrors: - - - message: '#^Dead catch \- CodeIgniter\\HTTP\\Exceptions\\RedirectException is never thrown in the try block\.$#' - count: 1 - path: ../../tests/system/ControllerTest.php diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index a0e8208d48a7..40d901a7ab2d 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -7,7 +7,6 @@ includes: - booleanNot.exprNotBoolean.neon - booleanOr.leftNotBoolean.neon - booleanOr.rightNotBoolean.neon - - catch.neverThrown.neon - class.notFound.neon - codeigniter.cacheHandlerInstance.neon - codeigniter.configArgumentInstanceof.neon