Skip to content

Commit 06e5089

Browse files
authored
Merge pull request #7756 from ddevsr/cache-type-specified
docs: PHPStan `Cache` no type specified
2 parents 48d1d9c + 3b07bab commit 06e5089

3 files changed

Lines changed: 4 additions & 40 deletions

File tree

phpstan-baseline.php

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
'count' => 1,
1717
'path' => __DIR__ . '/system/BaseModel.php',
1818
];
19-
$ignoreErrors[] = [
20-
'message' => '#^Method CodeIgniter\\\\Cache\\\\CacheInterface\\:\\:initialize\\(\\) has no return type specified\\.$#',
21-
'count' => 1,
22-
'path' => __DIR__ . '/system/Cache/CacheInterface.php',
23-
];
2419
$ignoreErrors[] = [
2520
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\BaseHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
2621
'count' => 1,
@@ -36,11 +31,6 @@
3631
'count' => 1,
3732
'path' => __DIR__ . '/system/Cache/Handlers/DummyHandler.php',
3833
];
39-
$ignoreErrors[] = [
40-
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\DummyHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
41-
'count' => 1,
42-
'path' => __DIR__ . '/system/Cache/Handlers/DummyHandler.php',
43-
];
4434
$ignoreErrors[] = [
4535
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\DummyHandler\\:\\:remember\\(\\) has parameter \\$callback with no signature specified for Closure\\.$#',
4636
'count' => 1,
@@ -51,51 +41,26 @@
5141
'count' => 1,
5242
'path' => __DIR__ . '/system/Cache/Handlers/FileHandler.php',
5343
];
54-
$ignoreErrors[] = [
55-
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\FileHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
56-
'count' => 1,
57-
'path' => __DIR__ . '/system/Cache/Handlers/FileHandler.php',
58-
];
5944
$ignoreErrors[] = [
6045
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\MemcachedHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
6146
'count' => 1,
6247
'path' => __DIR__ . '/system/Cache/Handlers/MemcachedHandler.php',
6348
];
64-
$ignoreErrors[] = [
65-
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\MemcachedHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
66-
'count' => 1,
67-
'path' => __DIR__ . '/system/Cache/Handlers/MemcachedHandler.php',
68-
];
6949
$ignoreErrors[] = [
7050
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\PredisHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
7151
'count' => 1,
7252
'path' => __DIR__ . '/system/Cache/Handlers/PredisHandler.php',
7353
];
74-
$ignoreErrors[] = [
75-
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\PredisHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
76-
'count' => 1,
77-
'path' => __DIR__ . '/system/Cache/Handlers/PredisHandler.php',
78-
];
7954
$ignoreErrors[] = [
8055
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\RedisHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
8156
'count' => 1,
8257
'path' => __DIR__ . '/system/Cache/Handlers/RedisHandler.php',
8358
];
84-
$ignoreErrors[] = [
85-
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\RedisHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
86-
'count' => 1,
87-
'path' => __DIR__ . '/system/Cache/Handlers/RedisHandler.php',
88-
];
8959
$ignoreErrors[] = [
9060
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\WincacheHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
9161
'count' => 1,
9262
'path' => __DIR__ . '/system/Cache/Handlers/WincacheHandler.php',
9363
];
94-
$ignoreErrors[] = [
95-
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\WincacheHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
96-
'count' => 1,
97-
'path' => __DIR__ . '/system/Cache/Handlers/WincacheHandler.php',
98-
];
9964
$ignoreErrors[] = [
10065
'message' => '#^Call to an undefined method CodeIgniter\\\\HTTP\\\\Request\\:\\:getPost\\(\\)\\.$#',
10166
'count' => 1,
@@ -2286,11 +2251,6 @@
22862251
'count' => 1,
22872252
'path' => __DIR__ . '/system/Test/Mock/MockCache.php',
22882253
];
2289-
$ignoreErrors[] = [
2290-
'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockCache\\:\\:initialize\\(\\) has no return type specified\\.$#',
2291-
'count' => 1,
2292-
'path' => __DIR__ . '/system/Test/Mock/MockCache.php',
2293-
];
22942254
$ignoreErrors[] = [
22952255
'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockCache\\:\\:remember\\(\\) has parameter \\$callback with no signature specified for Closure\\.$#',
22962256
'count' => 1,

system/Cache/CacheInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ interface CacheInterface
1818
{
1919
/**
2020
* Takes care of any handler-specific setup that must be done.
21+
*
22+
* @return void
2123
*/
2224
public function initialize();
2325

system/Test/Mock/MockCache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class MockCache extends BaseHandler implements CacheInterface
4242

4343
/**
4444
* Takes care of any handler-specific setup that must be done.
45+
*
46+
* @return void
4547
*/
4648
public function initialize()
4749
{

0 commit comments

Comments
 (0)