mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
refactor: add @throws RedirectException
in Controller::initController (#9327)
This commit is contained in:
parent
8fa419fdad
commit
cc1b8f2856
@ -15,6 +15,7 @@ namespace CodeIgniter;
|
||||
|
||||
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 @@ class Controller
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws HTTPException
|
||||
* @throws HTTPException|RedirectException
|
||||
*/
|
||||
protected function forceHTTPS(int $duration = 31_536_000)
|
||||
{
|
||||
|
@ -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
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user