diff --git a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php index b665aed4dc..7d54922f39 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php @@ -99,12 +99,6 @@ abstract class AbstractAdapter implements AdapterInterface, CacheInterface, Logg * * Using ApcuAdapter makes system caches compatible with read-only filesystems. * - * @param string $namespace - * @param int $defaultLifetime - * @param string $version - * @param string $directory - * @param LoggerInterface|null $logger - * * @return AdapterInterface */ public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, LoggerInterface $logger = null) diff --git a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php index 57e21d52d9..93f1105bc7 100644 --- a/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/AbstractTagAwareAdapter.php @@ -128,7 +128,7 @@ abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagA * * @return array The identifiers that failed to be cached or a boolean stating if caching succeeded or not */ - abstract protected function doSave(array $values, ?int $lifetime, array $addTagData = [], array $removeTagData = []): array; + abstract protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array; /** * Removes multiple items from the pool and their corresponding tags. diff --git a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php index f7135aa148..62ba4d9a82 100644 --- a/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ApcuAdapter.php @@ -72,7 +72,7 @@ class ApcuAdapter extends AbstractAdapter /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { return apcu_exists($id); } diff --git a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php index e0fa91219f..095b329f61 100644 --- a/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/ArrayAdapter.php @@ -31,7 +31,6 @@ class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInter private $createCacheItem; /** - * @param int $defaultLifetime * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise */ public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true) diff --git a/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php b/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php index 7da759d4b7..55a36e17f8 100644 --- a/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php @@ -65,7 +65,7 @@ class DoctrineAdapter extends AbstractAdapter /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { return $this->provider->contains($id); } diff --git a/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php index 2e8f6419dc..9abc1f013c 100644 --- a/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/FilesystemTagAwareAdapter.php @@ -51,7 +51,7 @@ class FilesystemTagAwareAdapter extends AbstractTagAwareAdapter implements Prune /** * {@inheritdoc} */ - protected function doSave(array $values, ?int $lifetime, array $addTagData = [], array $removeTagData = []): array + protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array { $failed = $this->doSaveCache($values, $lifetime); diff --git a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php index a625215529..c0d8bba435 100644 --- a/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/MemcachedAdapter.php @@ -276,7 +276,7 @@ class MemcachedAdapter extends AbstractAdapter /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { return false !== $this->getClient()->get(rawurlencode($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); } diff --git a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php index d1c0b75a42..a96eb290c6 100644 --- a/src/Symfony/Component/Cache/Adapter/PdoAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PdoAdapter.php @@ -236,7 +236,7 @@ class PdoAdapter extends AbstractAdapter implements PruneableInterface /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)"; $stmt = $this->getConnection()->prepare($sql); diff --git a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php index 080cc3cdd0..0f62f8380e 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php @@ -69,7 +69,7 @@ class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInte * * @return CacheItemPoolInterface */ - public static function create($file, CacheItemPoolInterface $fallbackPool) + public static function create(string $file, CacheItemPoolInterface $fallbackPool) { // Shared memory is available in PHP 7.0+ with OPCache enabled if (filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN)) { diff --git a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php index 57fb3b7311..1c90b0972f 100644 --- a/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php @@ -165,7 +165,7 @@ class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { if ($this->appendOnly && isset($this->values[$id])) { return true; diff --git a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php index 333c4af174..a13b20ebc2 100644 --- a/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php +++ b/src/Symfony/Component/Cache/Adapter/Psr16Adapter.php @@ -55,7 +55,7 @@ class Psr16Adapter extends AbstractAdapter implements PruneableInterface, Resett /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { return $this->pool->has($id); } diff --git a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php index 9cf0f5220a..5ee86d7564 100644 --- a/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/RedisTagAwareAdapter.php @@ -88,7 +88,7 @@ class RedisTagAwareAdapter extends AbstractTagAwareAdapter /** * {@inheritdoc} */ - protected function doSave(array $values, ?int $lifetime, array $addTagData = [], array $delTagData = []): array + protected function doSave(array $values, int $lifetime, array $addTagData = [], array $delTagData = []): array { // serialize values if (!$serialized = $this->marshaller->marshall($values, $failed)) { diff --git a/src/Symfony/Component/Cache/Traits/FilesystemTrait.php b/src/Symfony/Component/Cache/Traits/FilesystemTrait.php index 90c2f2e442..8418ee4481 100644 --- a/src/Symfony/Component/Cache/Traits/FilesystemTrait.php +++ b/src/Symfony/Component/Cache/Traits/FilesystemTrait.php @@ -81,7 +81,7 @@ trait FilesystemTrait /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { $file = $this->getFile($id); diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index 46f3ddd736..226ab6f172 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -324,7 +324,7 @@ trait RedisTrait /** * {@inheritdoc} */ - protected function doHave($id) + protected function doHave(string $id) { return (bool) $this->redis->exists($id); }