@@ -15,7 +15,7 @@ interface CacheInterface
15
15
* @throws \Psr\SimpleCache\InvalidArgumentException
16
16
* MUST be thrown if the $key string is not a legal value.
17
17
*/
18
- public function get (string $ key , mixed $ default = null );
18
+ public function get ($ key , $ default = null );
19
19
20
20
/**
21
21
* Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
@@ -31,7 +31,7 @@ public function get(string $key, mixed $default = null);
31
31
* @throws \Psr\SimpleCache\InvalidArgumentException
32
32
* MUST be thrown if the $key string is not a legal value.
33
33
*/
34
- public function set (string $ key , mixed $ value , null | int | \ DateInterval $ ttl = null );
34
+ public function set ($ key , $ value , $ ttl = null );
35
35
36
36
/**
37
37
* Delete an item from the cache by its unique key.
@@ -43,7 +43,7 @@ public function set(string $key, mixed $value, null|int|\DateInterval $ttl = nul
43
43
* @throws \Psr\SimpleCache\InvalidArgumentException
44
44
* MUST be thrown if the $key string is not a legal value.
45
45
*/
46
- public function delete (string $ key );
46
+ public function delete ($ key );
47
47
48
48
/**
49
49
* Wipes clean the entire cache's keys.
@@ -55,16 +55,16 @@ public function clear();
55
55
/**
56
56
* Obtains multiple cache items by their unique keys.
57
57
*
58
- * @param iterable<string> $keys A list of keys that can be obtained in a single operation.
59
- * @param mixed $default Default value to return for keys that do not exist.
58
+ * @param iterable $keys A list of keys that can obtained in a single operation.
59
+ * @param mixed $default Default value to return for keys that do not exist.
60
60
*
61
- * @return iterable<string, mixed> A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
61
+ * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value.
62
62
*
63
63
* @throws \Psr\SimpleCache\InvalidArgumentException
64
64
* MUST be thrown if $keys is neither an array nor a Traversable,
65
65
* or if any of the $keys are not a legal value.
66
66
*/
67
- public function getMultiple (iterable $ keys , mixed $ default = null );
67
+ public function getMultiple ($ keys , $ default = null );
68
68
69
69
/**
70
70
* Persists a set of key => value pairs in the cache, with an optional TTL.
@@ -80,20 +80,20 @@ public function getMultiple(iterable $keys, mixed $default = null);
80
80
* MUST be thrown if $values is neither an array nor a Traversable,
81
81
* or if any of the $values are not a legal value.
82
82
*/
83
- public function setMultiple (iterable $ values , null | int | \ DateInterval $ ttl = null );
83
+ public function setMultiple ($ values , $ ttl = null );
84
84
85
85
/**
86
86
* Deletes multiple cache items in a single operation.
87
87
*
88
- * @param iterable<string> $keys A list of string-based keys to be deleted.
88
+ * @param iterable $keys A list of string-based keys to be deleted.
89
89
*
90
90
* @return bool True if the items were successfully removed. False if there was an error.
91
91
*
92
92
* @throws \Psr\SimpleCache\InvalidArgumentException
93
93
* MUST be thrown if $keys is neither an array nor a Traversable,
94
94
* or if any of the $keys are not a legal value.
95
95
*/
96
- public function deleteMultiple (iterable $ keys );
96
+ public function deleteMultiple ($ keys );
97
97
98
98
/**
99
99
* Determines whether an item is present in the cache.
@@ -110,5 +110,5 @@ public function deleteMultiple(iterable $keys);
110
110
* @throws \Psr\SimpleCache\InvalidArgumentException
111
111
* MUST be thrown if the $key string is not a legal value.
112
112
*/
113
- public function has (string $ key );
113
+ public function has ($ key );
114
114
}
0 commit comments