Skip to content

Commit

Permalink
Merge pull request #7756 from ddevsr/cache-type-specified
Browse files Browse the repository at this point in the history
docs: PHPStan `Cache` no type specified
  • Loading branch information
kenjis authored Aug 2, 2023
2 parents 48d1d9c + 3b07bab commit 06e5089
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 40 deletions.
40 changes: 0 additions & 40 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
'count' => 1,
'path' => __DIR__ . '/system/BaseModel.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\CacheInterface\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/CacheInterface.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\BaseHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand All @@ -36,11 +31,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/DummyHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\DummyHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/DummyHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\DummyHandler\\:\\:remember\\(\\) has parameter \\$callback with no signature specified for Closure\\.$#',
'count' => 1,
Expand All @@ -51,51 +41,26 @@
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/FileHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\FileHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/FileHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\MemcachedHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/MemcachedHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\MemcachedHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/MemcachedHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\PredisHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/PredisHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\PredisHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/PredisHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\RedisHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/RedisHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\RedisHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/RedisHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\WincacheHandler\\:\\:deleteMatching\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/WincacheHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Cache\\\\Handlers\\\\WincacheHandler\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Cache/Handlers/WincacheHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Call to an undefined method CodeIgniter\\\\HTTP\\\\Request\\:\\:getPost\\(\\)\\.$#',
'count' => 1,
Expand Down Expand Up @@ -2286,11 +2251,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Test/Mock/MockCache.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockCache\\:\\:initialize\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Test/Mock/MockCache.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Test\\\\Mock\\\\MockCache\\:\\:remember\\(\\) has parameter \\$callback with no signature specified for Closure\\.$#',
'count' => 1,
Expand Down
2 changes: 2 additions & 0 deletions system/Cache/CacheInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ interface CacheInterface
{
/**
* Takes care of any handler-specific setup that must be done.
*
* @return void
*/
public function initialize();

Expand Down
2 changes: 2 additions & 0 deletions system/Test/Mock/MockCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class MockCache extends BaseHandler implements CacheInterface

/**
* Takes care of any handler-specific setup that must be done.
*
* @return void
*/
public function initialize()
{
Expand Down

0 comments on commit 06e5089

Please sign in to comment.