Skip to content

Commit

Permalink
Merge pull request #5647 from kenjis/fix-BaseController
Browse files Browse the repository at this point in the history
refactor: make BaseController abstract
  • Loading branch information
kenjis authored Feb 3, 2022
2 parents 731fb2f + 51fee60 commit 069cb70
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* For security be sure to declare any new methods as protected or private.
*/
class BaseController extends Controller
abstract class BaseController extends Controller
{
/**
* Instance of the main Request object.
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,6 @@ parameters:
count: 1
path: system/Debug/Exceptions.php

-
message: "#^Parameter \\#4 \\$replacement of function array_splice expects array\\|string, true given\\.$#"
count: 1
path: system/Debug/Exceptions.php

-
message: "#^Property CodeIgniter\\\\Debug\\\\Exceptions\\:\\:\\$formatter \\(CodeIgniter\\\\Format\\\\FormatterInterface\\) in isset\\(\\) is not nullable\\.$#"
count: 1
Expand Down
5 changes: 0 additions & 5 deletions system/Config/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
* already loaded up and ready for us to use.
*/

// Prevent access to BaseController
$routes->add('BaseController(:any)', static function () {
throw PageNotFoundException::forPageNotFound();
});

// Prevent access to initController method
$routes->add('(:any)/initController', static function () {
throw PageNotFoundException::forPageNotFound();
Expand Down

0 comments on commit 069cb70

Please sign in to comment.