Skip to content

Commit cc1b8f2

Browse files
authored
refactor: add @throws RedirectException in Controller::initController (#9327)
1 parent 8fa419f commit cc1b8f2

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

system/Controller.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use CodeIgniter\HTTP\CLIRequest;
1717
use CodeIgniter\HTTP\Exceptions\HTTPException;
18+
use CodeIgniter\HTTP\Exceptions\RedirectException;
1819
use CodeIgniter\HTTP\IncomingRequest;
1920
use CodeIgniter\HTTP\RequestInterface;
2021
use CodeIgniter\HTTP\ResponseInterface;
@@ -77,7 +78,7 @@ class Controller
7778
*
7879
* @return void
7980
*
80-
* @throws HTTPException
81+
* @throws HTTPException|RedirectException
8182
*/
8283
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
8384
{
@@ -105,7 +106,7 @@ public function initController(RequestInterface $request, ResponseInterface $res
105106
*
106107
* @return void
107108
*
108-
* @throws HTTPException
109+
* @throws HTTPException|RedirectException
109110
*/
110111
protected function forceHTTPS(int $duration = 31_536_000)
111112
{

utils/phpstan-baseline/catch.neverThrown.neon

Lines changed: 0 additions & 8 deletions
This file was deleted.

utils/phpstan-baseline/loader.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ includes:
77
- booleanNot.exprNotBoolean.neon
88
- booleanOr.leftNotBoolean.neon
99
- booleanOr.rightNotBoolean.neon
10-
- catch.neverThrown.neon
1110
- class.notFound.neon
1211
- codeigniter.cacheHandlerInstance.neon
1312
- codeigniter.configArgumentInstanceof.neon

0 commit comments

Comments
 (0)