Skip to content

Commit 069cb70

Browse files
authored
Merge pull request #5647 from kenjis/fix-BaseController
refactor: make BaseController abstract
2 parents 731fb2f + 51fee60 commit 069cb70

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

app/Controllers/BaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* For security be sure to declare any new methods as protected or private.
2121
*/
22-
class BaseController extends Controller
22+
abstract class BaseController extends Controller
2323
{
2424
/**
2525
* Instance of the main Request object.

phpstan-baseline.neon.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,6 @@ parameters:
485485
count: 1
486486
path: system/Debug/Exceptions.php
487487

488-
-
489-
message: "#^Parameter \\#4 \\$replacement of function array_splice expects array\\|string, true given\\.$#"
490-
count: 1
491-
path: system/Debug/Exceptions.php
492-
493488
-
494489
message: "#^Property CodeIgniter\\\\Debug\\\\Exceptions\\:\\:\\$formatter \\(CodeIgniter\\\\Format\\\\FormatterInterface\\) in isset\\(\\) is not nullable\\.$#"
495490
count: 1

system/Config/Routes.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
* already loaded up and ready for us to use.
2222
*/
2323

24-
// Prevent access to BaseController
25-
$routes->add('BaseController(:any)', static function () {
26-
throw PageNotFoundException::forPageNotFound();
27-
});
28-
2924
// Prevent access to initController method
3025
$routes->add('(:any)/initController', static function () {
3126
throw PageNotFoundException::forPageNotFound();

0 commit comments

Comments
 (0)