Fix: Remove the system-Controller ignore errors.

This commit is contained in:
蔡銘凱 2023-08-08 14:30:20 +08:00
parent 9f7e031c4b
commit 0a642941ac
No known key found for this signature in database
GPG Key ID: 501068E86BCC9616
2 changed files with 8 additions and 20 deletions

View File

@ -346,26 +346,6 @@ $ignoreErrors[] = [
'count' => 1,
'path' => __DIR__ . '/system/Config/View.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Controller\\:\\:cachePage\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Controller.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Controller\\:\\:forceHTTPS\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Controller.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Controller\\:\\:initController\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Controller.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Controller\\:\\:loadHelpers\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Controller.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Database\\\\BaseBuilder\\:\\:_whereIn\\(\\) has parameter \\$values with no signature specified for Closure\\.$#',
'count' => 1,

View File

@ -70,6 +70,8 @@ class Controller
/**
* Constructor.
*
* @return void
*
* @throws HTTPException
*/
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
@ -96,6 +98,8 @@ class Controller
* considered secure for. Only with HSTS header.
* Default value is 1 year.
*
* @return void
*
* @throws HTTPException
*/
protected function forceHTTPS(int $duration = 31_536_000)
@ -106,6 +110,8 @@ class Controller
/**
* Provides a simple way to tie into the main CodeIgniter class and
* tell it how long to cache the current page for.
*
* @return void
*/
protected function cachePage(int $time)
{
@ -118,6 +124,8 @@ class Controller
* @deprecated Use `helper` function instead of using this method.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function loadHelpers()
{