]> git.mxchange.org Git - friendica.git/commitdiff
Ignore false positive PHPStan error
authorArt4 <art4@wlabs.de>
Tue, 5 Nov 2024 15:26:24 +0000 (15:26 +0000)
committerArt4 <art4@wlabs.de>
Tue, 5 Nov 2024 15:26:24 +0000 (15:26 +0000)
see https://github.com/friendica/friendica-addons/pull/1363

src/Core/Cache/Type/APCuCache.php

index d9bcfbc60d7837539760ebf17178b55253acbe52..5564a1e7935940bda442cdf7aff0bfac29b06c51 100644 (file)
@@ -7,7 +7,6 @@
 
 namespace Friendica\Core\Cache\Type;
 
-use APCUIterator;
 use Friendica\Core\Cache\Enum\Duration;
 use Friendica\Core\Cache\Capability\ICanCacheInMemory;
 use Friendica\Core\Cache\Exception\InvalidCacheDriverException;
@@ -42,7 +41,8 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory
                $ns = $this->getCacheKey($prefix ?? '');
                $ns = preg_quote($ns, '/');
 
-               $iterator = new APCUIterator('/^' . $ns . '/', APC_ITER_KEY);
+               /** @phpstan-ignore-next-line see https://github.com/friendica/friendica-addons/pull/1363 */
+               $iterator = new \APCUIterator('/^' . $ns . '/', APC_ITER_KEY);
 
                $keys = [];
                foreach ($iterator as $item) {
@@ -119,7 +119,8 @@ class APCuCache extends AbstractCache implements ICanCacheInMemory
                        $prefix = $this->getPrefix();
                        $prefix = preg_quote($prefix, '/');
 
-                       $iterator = new APCUIterator('/^' . $prefix . '/', APC_ITER_KEY);
+                       /** @phpstan-ignore-next-line see https://github.com/friendica/friendica-addons/pull/1363 */
+                       $iterator = new \APCUIterator('/^' . $prefix . '/', APC_ITER_KEY);
 
                        return apcu_delete($iterator);
                }