From 5d2ff3ccd2206d04e4a002fdf3e23db79e11f6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 17 Apr 2024 15:47:46 +0200 Subject: [PATCH] Fix $key type in Cache\Store --- src/Illuminate/Cache/ApcStore.php | 2 +- src/Illuminate/Cache/ArrayStore.php | 2 +- src/Illuminate/Cache/DatabaseStore.php | 14 +++++++------- src/Illuminate/Cache/DynamoDbStore.php | 4 ++-- src/Illuminate/Cache/FileStore.php | 2 +- src/Illuminate/Cache/MemcachedStore.php | 4 ++-- src/Illuminate/Cache/NullStore.php | 4 ++-- src/Illuminate/Cache/RedisStore.php | 2 +- src/Illuminate/Contracts/Cache/Store.php | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Illuminate/Cache/ApcStore.php b/src/Illuminate/Cache/ApcStore.php index 50e4c62adcbe..8bba88b50708 100755 --- a/src/Illuminate/Cache/ApcStore.php +++ b/src/Illuminate/Cache/ApcStore.php @@ -36,7 +36,7 @@ public function __construct(ApcWrapper $apc, $prefix = '') /** * Retrieve an item from the cache by key. * - * @param string|array $key + * @param string $key * @return mixed */ public function get($key) diff --git a/src/Illuminate/Cache/ArrayStore.php b/src/Illuminate/Cache/ArrayStore.php index 4cca8cbf6960..353552777462 100644 --- a/src/Illuminate/Cache/ArrayStore.php +++ b/src/Illuminate/Cache/ArrayStore.php @@ -45,7 +45,7 @@ public function __construct($serializesValues = false) /** * Retrieve an item from the cache by key. * - * @param string|array $key + * @param string $key * @return mixed */ public function get($key) diff --git a/src/Illuminate/Cache/DatabaseStore.php b/src/Illuminate/Cache/DatabaseStore.php index 442e6356d387..1c8b893789e4 100755 --- a/src/Illuminate/Cache/DatabaseStore.php +++ b/src/Illuminate/Cache/DatabaseStore.php @@ -93,7 +93,7 @@ public function __construct(ConnectionInterface $connection, /** * Retrieve an item from the cache by key. * - * @param string|array $key + * @param string $key * @return mixed */ public function get($key) @@ -177,8 +177,8 @@ public function add($key, $value, $seconds) * Increment the value of an item in the cache. * * @param string $key - * @param mixed $value - * @return int|bool + * @param int $value + * @return int|false */ public function increment($key, $value = 1) { @@ -191,8 +191,8 @@ public function increment($key, $value = 1) * Decrement the value of an item in the cache. * * @param string $key - * @param mixed $value - * @return int|bool + * @param int $value + * @return int|false */ public function decrement($key, $value = 1) { @@ -205,9 +205,9 @@ public function decrement($key, $value = 1) * Increment or decrement an item in the cache. * * @param string $key - * @param mixed $value + * @param int|float $value * @param \Closure $callback - * @return int|bool + * @return int|false */ protected function incrementOrDecrement($key, $value, Closure $callback) { diff --git a/src/Illuminate/Cache/DynamoDbStore.php b/src/Illuminate/Cache/DynamoDbStore.php index 31b8dc48ef01..88c7cf3be436 100644 --- a/src/Illuminate/Cache/DynamoDbStore.php +++ b/src/Illuminate/Cache/DynamoDbStore.php @@ -305,7 +305,7 @@ public function add($key, $value, $seconds) * * @param string $key * @param mixed $value - * @return int|bool + * @return int|false */ public function increment($key, $value = 1) { @@ -350,7 +350,7 @@ public function increment($key, $value = 1) * * @param string $key * @param mixed $value - * @return int|bool + * @return int|false */ public function decrement($key, $value = 1) { diff --git a/src/Illuminate/Cache/FileStore.php b/src/Illuminate/Cache/FileStore.php index 5e3fba081caa..fbd541ad8604 100755 --- a/src/Illuminate/Cache/FileStore.php +++ b/src/Illuminate/Cache/FileStore.php @@ -60,7 +60,7 @@ public function __construct(Filesystem $files, $directory, $filePermission = nul /** * Retrieve an item from the cache by key. * - * @param string|array $key + * @param string $key * @return mixed */ public function get($key) diff --git a/src/Illuminate/Cache/MemcachedStore.php b/src/Illuminate/Cache/MemcachedStore.php index 27a69d5c2da1..88198d9222bf 100755 --- a/src/Illuminate/Cache/MemcachedStore.php +++ b/src/Illuminate/Cache/MemcachedStore.php @@ -147,7 +147,7 @@ public function add($key, $value, $seconds) * * @param string $key * @param mixed $value - * @return int|bool + * @return int|false */ public function increment($key, $value = 1) { @@ -159,7 +159,7 @@ public function increment($key, $value = 1) * * @param string $key * @param mixed $value - * @return int|bool + * @return int|false */ public function decrement($key, $value = 1) { diff --git a/src/Illuminate/Cache/NullStore.php b/src/Illuminate/Cache/NullStore.php index 5694e6c6755b..6c35ee386c26 100755 --- a/src/Illuminate/Cache/NullStore.php +++ b/src/Illuminate/Cache/NullStore.php @@ -37,7 +37,7 @@ public function put($key, $value, $seconds) * * @param string $key * @param mixed $value - * @return bool + * @return false */ public function increment($key, $value = 1) { @@ -49,7 +49,7 @@ public function increment($key, $value = 1) * * @param string $key * @param mixed $value - * @return bool + * @return false */ public function decrement($key, $value = 1) { diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index 369e2c6e3d7a..f953d30d5857 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -57,7 +57,7 @@ public function __construct(Redis $redis, $prefix = '', $connection = 'default') /** * Retrieve an item from the cache by key. * - * @param string|array $key + * @param string $key * @return mixed */ public function get($key) diff --git a/src/Illuminate/Contracts/Cache/Store.php b/src/Illuminate/Contracts/Cache/Store.php index 133bc43e9f1b..4ededd4efbc8 100644 --- a/src/Illuminate/Contracts/Cache/Store.php +++ b/src/Illuminate/Contracts/Cache/Store.php @@ -7,7 +7,7 @@ interface Store /** * Retrieve an item from the cache by key. * - * @param string|array $key + * @param string $key * @return mixed */ public function get($key);