Skip to content

Commit cef0e94

Browse files
committed
refactor: remove redundant property declarations in BaseController
1 parent 59de29e commit cef0e94

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

app/Controllers/BaseController.php

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,28 @@
33
namespace App\Controllers;
44

55
use CodeIgniter\Controller;
6-
use CodeIgniter\HTTP\CLIRequest;
7-
use CodeIgniter\HTTP\IncomingRequest;
86
use CodeIgniter\HTTP\RequestInterface;
97
use CodeIgniter\HTTP\ResponseInterface;
108
use Psr\Log\LoggerInterface;
119

1210
/**
13-
* Class BaseController
14-
*
1511
* BaseController provides a convenient place for loading components
1612
* and performing functions that are needed by all your controllers.
13+
*
1714
* Extend this class in any new controllers:
15+
* ```
1816
* class Home extends BaseController
17+
* ```
1918
*
20-
* For security be sure to declare any new methods as protected or private.
19+
* For security, be sure to declare any new methods as protected or private.
2120
*/
2221
abstract class BaseController extends Controller
2322
{
24-
/**
25-
* Instance of the main Request object.
26-
*
27-
* @var CLIRequest|IncomingRequest
28-
*/
29-
protected $request;
30-
31-
/**
32-
* An array of helpers to be loaded automatically upon
33-
* class instantiation. These helpers will be available
34-
* to all other controllers that extend BaseController.
35-
*
36-
* @var list<string>
37-
*/
38-
protected $helpers = [];
39-
4023
/**
4124
* Be sure to declare properties for any property fetch you initialized.
4225
* The creation of dynamic property is deprecated in PHP 8.2.
4326
*/
27+
4428
// protected $session;
4529

4630
/**

system/Controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
use Psr\Log\LoggerInterface;
2626

2727
/**
28-
* Class Controller
29-
*
3028
* @see \CodeIgniter\ControllerTest
3129
*/
3230
class Controller

0 commit comments

Comments
 (0)