Skip to content

Commit 66c356a

Browse files
committed
docs: PHPStan Codeigniter no type specified
1 parent 689c933 commit 66c356a

2 files changed

Lines changed: 26 additions & 70 deletions

File tree

phpstan-baseline.php

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -101,71 +101,6 @@
101101
'count' => 6,
102102
'path' => __DIR__ . '/system/CodeIgniter.php',
103103
];
104-
$ignoreErrors[] = [
105-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:bootstrapEnvironment\\(\\) has no return type specified\\.$#',
106-
'count' => 1,
107-
'path' => __DIR__ . '/system/CodeIgniter.php',
108-
];
109-
$ignoreErrors[] = [
110-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:callExit\\(\\) has no return type specified\\.$#',
111-
'count' => 1,
112-
'path' => __DIR__ . '/system/CodeIgniter.php',
113-
];
114-
$ignoreErrors[] = [
115-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:detectEnvironment\\(\\) has no return type specified\\.$#',
116-
'count' => 1,
117-
'path' => __DIR__ . '/system/CodeIgniter.php',
118-
];
119-
$ignoreErrors[] = [
120-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:forceSecureAccess\\(\\) has no return type specified\\.$#',
121-
'count' => 1,
122-
'path' => __DIR__ . '/system/CodeIgniter.php',
123-
];
124-
$ignoreErrors[] = [
125-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:gatherOutput\\(\\) has no return type specified\\.$#',
126-
'count' => 1,
127-
'path' => __DIR__ . '/system/CodeIgniter.php',
128-
];
129-
$ignoreErrors[] = [
130-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:getRequestObject\\(\\) has no return type specified\\.$#',
131-
'count' => 1,
132-
'path' => __DIR__ . '/system/CodeIgniter.php',
133-
];
134-
$ignoreErrors[] = [
135-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:getResponseObject\\(\\) has no return type specified\\.$#',
136-
'count' => 1,
137-
'path' => __DIR__ . '/system/CodeIgniter.php',
138-
];
139-
$ignoreErrors[] = [
140-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:initialize\\(\\) has no return type specified\\.$#',
141-
'count' => 1,
142-
'path' => __DIR__ . '/system/CodeIgniter.php',
143-
];
144-
$ignoreErrors[] = [
145-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:initializeKint\\(\\) has no return type specified\\.$#',
146-
'count' => 1,
147-
'path' => __DIR__ . '/system/CodeIgniter.php',
148-
];
149-
$ignoreErrors[] = [
150-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:resolvePlatformExtensions\\(\\) has no return type specified\\.$#',
151-
'count' => 1,
152-
'path' => __DIR__ . '/system/CodeIgniter.php',
153-
];
154-
$ignoreErrors[] = [
155-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:spoofRequestMethod\\(\\) has no return type specified\\.$#',
156-
'count' => 1,
157-
'path' => __DIR__ . '/system/CodeIgniter.php',
158-
];
159-
$ignoreErrors[] = [
160-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:startBenchmark\\(\\) has no return type specified\\.$#',
161-
'count' => 1,
162-
'path' => __DIR__ . '/system/CodeIgniter.php',
163-
];
164-
$ignoreErrors[] = [
165-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:storePreviousURL\\(\\) has no return type specified\\.$#',
166-
'count' => 1,
167-
'path' => __DIR__ . '/system/CodeIgniter.php',
168-
];
169104
$ignoreErrors[] = [
170105
'message' => '#^Property CodeIgniter\\\\CodeIgniter\\:\\:\\$controller type has no signature specified for Closure\\.$#',
171106
'count' => 1,
@@ -2996,11 +2931,6 @@
29962931
'count' => 2,
29972932
'path' => __DIR__ . '/system/Test/Mock/MockCache.php',
29982933
];
2999-
$ignoreErrors[] = [
3000-
'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockCodeIgniter\\:\\:callExit\\(\\) has no return type specified\\.$#',
3001-
'count' => 1,
3002-
'path' => __DIR__ . '/system/Test/Mock/MockCodeIgniter.php',
3003-
];
30042934
$ignoreErrors[] = [
30052935
'message' => '#^Cannot access property \\$insert_id on object\\|resource\\|false\\.$#',
30062936
'count' => 1,

system/CodeIgniter.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ public function __construct(App $config)
198198

199199
/**
200200
* Handles some basic app and environment setup.
201+
*
202+
* @return void
201203
*/
202204
public function initialize()
203205
{
@@ -224,6 +226,8 @@ public function initialize()
224226
/**
225227
* Checks system for missing required PHP extensions.
226228
*
229+
* @return void
230+
*
227231
* @throws FrameworkException
228232
*
229233
* @codeCoverageIgnore
@@ -251,6 +255,8 @@ protected function resolvePlatformExtensions()
251255

252256
/**
253257
* Initializes Kint
258+
*
259+
* @return void
254260
*/
255261
protected function initializeKint()
256262
{
@@ -564,6 +570,8 @@ protected function handleRequest(?RouteCollectionInterface $routes, Cache $cache
564570
*
565571
* @codeCoverageIgnore
566572
*
573+
* @return void
574+
*
567575
* @deprecated 4.4.0 No longer used. Moved to index.php and spark.
568576
*/
569577
protected function detectEnvironment()
@@ -579,6 +587,8 @@ protected function detectEnvironment()
579587
*
580588
* If no boot file exists, we shouldn't continue because something
581589
* is wrong. At the very least, they should have error reporting setup.
590+
*
591+
* @return void
582592
*/
583593
protected function bootstrapEnvironment()
584594
{
@@ -599,6 +609,8 @@ protected function bootstrapEnvironment()
599609
*
600610
* The timer is used to display total script execution both in the
601611
* debug toolbar, and potentially on the displayed page.
612+
*
613+
* @return void
602614
*/
603615
protected function startBenchmark()
604616
{
@@ -628,6 +640,8 @@ public function setRequest($request)
628640

629641
/**
630642
* Get our Request object, (either IncomingRequest or CLIRequest).
643+
*
644+
* @return void
631645
*/
632646
protected function getRequestObject()
633647
{
@@ -647,6 +661,8 @@ protected function getRequestObject()
647661
/**
648662
* Get our Response object, and set some default values, including
649663
* the HTTP protocol version and a default successful response.
664+
*
665+
* @return void
650666
*/
651667
protected function getResponseObject()
652668
{
@@ -669,6 +685,8 @@ protected function getResponseObject()
669685
*
670686
* @param int $duration How long the Strict Transport Security
671687
* should be enforced for this URL.
688+
*
689+
* @return void
672690
*/
673691
protected function forceSecureAccess($duration = 31_536_000)
674692
{
@@ -978,6 +996,8 @@ protected function display404errors(PageNotFoundException $e)
978996
* @param ResponseInterface|string|null $returned
979997
*
980998
* @deprecated $cacheConfig is deprecated.
999+
*
1000+
* @return void
9811001
*/
9821002
protected function gatherOutput(?Cache $cacheConfig = null, $returned = null)
9831003
{
@@ -1014,6 +1034,8 @@ protected function gatherOutput(?Cache $cacheConfig = null, $returned = null)
10141034
* This helps provider safer, more reliable previous_url() detection.
10151035
*
10161036
* @param string|URI $uri
1037+
*
1038+
* @return void
10171039
*/
10181040
public function storePreviousURL($uri)
10191041
{
@@ -1055,6 +1077,8 @@ public function storePreviousURL($uri)
10551077
/**
10561078
* Modifies the Request Object to use a different method if a POST
10571079
* variable called _method is found.
1080+
*
1081+
* @return void
10581082
*/
10591083
public function spoofRequestMethod()
10601084
{
@@ -1096,6 +1120,8 @@ protected function sendResponse()
10961120
* @param int $code
10971121
*
10981122
* @deprecated 4.4.0 No longer Used. Moved to index.php.
1123+
*
1124+
* @return void
10991125
*/
11001126
protected function callExit($code)
11011127
{

0 commit comments

Comments
 (0)