Skip to content

Commit f0af89d

Browse files
authored
Merge pull request #7948 from ddevsr/codeigniter-specified-type
docs: PHPStan `Codeigniter` no type specified
2 parents 00ba7fb + 02ec2d9 commit f0af89d

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
@@ -226,71 +226,6 @@
226226
'count' => 6,
227227
'path' => __DIR__ . '/system/CodeIgniter.php',
228228
];
229-
$ignoreErrors[] = [
230-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:bootstrapEnvironment\\(\\) has no return type specified\\.$#',
231-
'count' => 1,
232-
'path' => __DIR__ . '/system/CodeIgniter.php',
233-
];
234-
$ignoreErrors[] = [
235-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:callExit\\(\\) has no return type specified\\.$#',
236-
'count' => 1,
237-
'path' => __DIR__ . '/system/CodeIgniter.php',
238-
];
239-
$ignoreErrors[] = [
240-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:detectEnvironment\\(\\) has no return type specified\\.$#',
241-
'count' => 1,
242-
'path' => __DIR__ . '/system/CodeIgniter.php',
243-
];
244-
$ignoreErrors[] = [
245-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:forceSecureAccess\\(\\) has no return type specified\\.$#',
246-
'count' => 1,
247-
'path' => __DIR__ . '/system/CodeIgniter.php',
248-
];
249-
$ignoreErrors[] = [
250-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:gatherOutput\\(\\) has no return type specified\\.$#',
251-
'count' => 1,
252-
'path' => __DIR__ . '/system/CodeIgniter.php',
253-
];
254-
$ignoreErrors[] = [
255-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:getRequestObject\\(\\) has no return type specified\\.$#',
256-
'count' => 1,
257-
'path' => __DIR__ . '/system/CodeIgniter.php',
258-
];
259-
$ignoreErrors[] = [
260-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:getResponseObject\\(\\) has no return type specified\\.$#',
261-
'count' => 1,
262-
'path' => __DIR__ . '/system/CodeIgniter.php',
263-
];
264-
$ignoreErrors[] = [
265-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:initialize\\(\\) has no return type specified\\.$#',
266-
'count' => 1,
267-
'path' => __DIR__ . '/system/CodeIgniter.php',
268-
];
269-
$ignoreErrors[] = [
270-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:initializeKint\\(\\) has no return type specified\\.$#',
271-
'count' => 1,
272-
'path' => __DIR__ . '/system/CodeIgniter.php',
273-
];
274-
$ignoreErrors[] = [
275-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:resolvePlatformExtensions\\(\\) has no return type specified\\.$#',
276-
'count' => 1,
277-
'path' => __DIR__ . '/system/CodeIgniter.php',
278-
];
279-
$ignoreErrors[] = [
280-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:spoofRequestMethod\\(\\) has no return type specified\\.$#',
281-
'count' => 1,
282-
'path' => __DIR__ . '/system/CodeIgniter.php',
283-
];
284-
$ignoreErrors[] = [
285-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:startBenchmark\\(\\) has no return type specified\\.$#',
286-
'count' => 1,
287-
'path' => __DIR__ . '/system/CodeIgniter.php',
288-
];
289-
$ignoreErrors[] = [
290-
'message' => '#^Method CodeIgniter\\\\CodeIgniter\\:\\:storePreviousURL\\(\\) has no return type specified\\.$#',
291-
'count' => 1,
292-
'path' => __DIR__ . '/system/CodeIgniter.php',
293-
];
294229
$ignoreErrors[] = [
295230
'message' => '#^Only booleans are allowed in an if condition, CodeIgniter\\\\HTTP\\\\ResponseInterface\\|null given\\.$#',
296231
'count' => 1,
@@ -3811,11 +3746,6 @@
38113746
'count' => 2,
38123747
'path' => __DIR__ . '/system/Test/Mock/MockCache.php',
38133748
];
3814-
$ignoreErrors[] = [
3815-
'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockCodeIgniter\\:\\:callExit\\(\\) has no return type specified\\.$#',
3816-
'count' => 1,
3817-
'path' => __DIR__ . '/system/Test/Mock/MockCodeIgniter.php',
3818-
];
38193749
$ignoreErrors[] = [
38203750
'message' => '#^Cannot access property \\$insert_id on object\\|resource\\|false\\.$#',
38213751
'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)