diff --git a/src/Apcu.php b/src/Apcu.php index 13b3fdb..572425b 100644 --- a/src/Apcu.php +++ b/src/Apcu.php @@ -59,7 +59,7 @@ final class Apcu extends AbstractAdapter implements * * @var null|int|float */ - protected $totalSpace; + private $totalSpace; /** * Constructor @@ -731,7 +731,7 @@ protected function internalGetCapabilities() ); // update namespace separator on change option - $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) { + $this->getEventManager()->attach('option', static function ($event) use ($capabilities, $marker): void { $params = $event->getParams(); if (isset($params['namespace_separator'])) { diff --git a/src/ApcuIterator.php b/src/ApcuIterator.php index c22329e..9ddf7cc 100644 --- a/src/ApcuIterator.php +++ b/src/ApcuIterator.php @@ -5,6 +5,7 @@ namespace Laminas\Cache\Storage\Adapter; use APCUIterator as BaseApcuIterator; +use Laminas\Cache\Storage\Adapter\Apcu; use Laminas\Cache\Storage\IteratorInterface; use ReturnTypeWillChange; @@ -15,32 +16,25 @@ final class ApcuIterator implements IteratorInterface { /** * The storage instance - * - * @var Apcu */ - private $storage; + private Apcu $storage; /** * The iterator mode * - * @var int * @psalm-var IteratorInterface::CURRENT_AS_* */ - private $mode = IteratorInterface::CURRENT_AS_KEY; + private int $mode = IteratorInterface::CURRENT_AS_KEY; /** * The base APCIterator instance - * - * @var BaseApcuIterator */ - private $baseIterator; + private BaseApcuIterator $baseIterator; /** * The length of the namespace prefix - * - * @var int */ - private $prefixLength; + private int $prefixLength; public function __construct(Apcu $storage, BaseApcuIterator $baseIterator, string $prefix) { diff --git a/test/integration/Psr/CacheItemPool/ApcuIntegrationTest.php b/test/integration/Psr/CacheItemPool/ApcuIntegrationTest.php index cf46925..d42b290 100644 --- a/test/integration/Psr/CacheItemPool/ApcuIntegrationTest.php +++ b/test/integration/Psr/CacheItemPool/ApcuIntegrationTest.php @@ -16,10 +16,8 @@ final class ApcuIntegrationTest extends AbstractCacheItemPoolIntegrationTest { /** * Restore 'apc.use_request_time' - * - * @var string */ - protected $iniUseRequestTime; + private string $iniUseRequestTime; public function testApcUseRequestTimeThrowsException(): void { diff --git a/test/unit/Apcu/ConfigProviderTest.php b/test/unit/Apcu/ConfigProviderTest.php index b70c58c..6bf874f 100644 --- a/test/unit/Apcu/ConfigProviderTest.php +++ b/test/unit/Apcu/ConfigProviderTest.php @@ -11,8 +11,7 @@ final class ConfigProviderTest extends TestCase { - /** @var ConfigProvider */ - private $provider; + private ConfigProvider $provider; protected function setUp(): void { diff --git a/test/unit/Apcu/ModuleTest.php b/test/unit/Apcu/ModuleTest.php index ef9c72d..42f1a60 100644 --- a/test/unit/Apcu/ModuleTest.php +++ b/test/unit/Apcu/ModuleTest.php @@ -10,8 +10,7 @@ final class ModuleTest extends TestCase { - /** @var Module */ - private $module; + private Module $module; protected function setUp(): void { diff --git a/test/unit/ApcuTest.php b/test/unit/ApcuTest.php index 73db946..7db1cc9 100644 --- a/test/unit/ApcuTest.php +++ b/test/unit/ApcuTest.php @@ -15,10 +15,8 @@ final class ApcuTest extends AbstractCommonAdapterTest { /** * Restore 'apc.use_request_time' - * - * @var string */ - protected $iniUseRequestTime; + private string $iniUseRequestTime; public function setUp(): void {