@@ -62,11 +62,11 @@ public function __construct($driver, ConfigurationOptionInterface $config = null
6262
6363 /**
6464 * @param string $key
65- * @param mixed|null $default
66- * @return mixed|null
65+ * @param mixed $default
66+ * @return mixed
6767 * @throws PhpfastcacheSimpleCacheException
6868 */
69- public function get ($ key , $ default = null )
69+ public function get (string $ key , mixed $ default = null ): mixed
7070 {
7171 try {
7272 $ cacheItem = $ this ->internalCacheInstance ->getItem ($ key );
@@ -87,7 +87,7 @@ public function get($key, $default = null)
8787 * @return bool
8888 * @throws PhpfastcacheSimpleCacheException
8989 */
90- public function set ($ key , $ value , $ ttl = null ): bool
90+ public function set (string $ key , mixed $ value , null | int | \ DateInterval $ ttl = null ): bool
9191 {
9292 try {
9393 $ cacheItem = $ this ->internalCacheInstance
@@ -110,7 +110,7 @@ public function set($key, $value, $ttl = null): bool
110110 * @throws PhpfastcacheSimpleCacheException
111111 * @throws InvalidArgumentException
112112 */
113- public function delete ($ key ): bool
113+ public function delete (string $ key ): bool
114114 {
115115 try {
116116 return $ this ->internalCacheInstance ->deleteItem ($ key );
@@ -135,10 +135,10 @@ public function clear(): bool
135135 /**
136136 * @param iterable $keys
137137 * @param null $default
138- * @return ExtendedCacheItemInterface[]|iterable
138+ * @return ExtendedCacheItemInterface[]
139139 * @throws PhpfastcacheSimpleCacheException
140140 */
141- public function getMultiple ($ keys , $ default = null )
141+ public function getMultiple (iterable $ keys , mixed $ default = null ): iterable
142142 {
143143 if ($ keys instanceof Traversable) {
144144 $ keys = \iterator_to_array ($ keys );
@@ -154,12 +154,12 @@ public function getMultiple($keys, $default = null)
154154 }
155155
156156 /**
157- * @param string[] $values
157+ * @param iterable $values
158158 * @param null|int|DateInterval $ttl
159159 * @return bool
160160 * @throws PhpfastcacheSimpleCacheException
161161 */
162- public function setMultiple ($ values , $ ttl = null ): bool
162+ public function setMultiple (iterable $ values , null | int | \ DateInterval $ ttl = null ): bool
163163 {
164164 try {
165165 foreach ($ values as $ key => $ value ) {
@@ -180,12 +180,12 @@ public function setMultiple($values, $ttl = null): bool
180180 }
181181
182182 /**
183- * @param iterable|array $keys
183+ * @param iterable $keys
184184 * @return bool
185185 * @throws PhpfastcacheSimpleCacheException
186186 * @throws InvalidArgumentException
187187 */
188- public function deleteMultiple ($ keys ): bool
188+ public function deleteMultiple (iterable $ keys ): bool
189189 {
190190 try {
191191 if ($ keys instanceof Traversable) {
@@ -207,7 +207,7 @@ public function deleteMultiple($keys): bool
207207 * @return bool
208208 * @throws PhpfastcacheSimpleCacheException
209209 */
210- public function has ($ key ): bool
210+ public function has (string $ key ): bool
211211 {
212212 try {
213213 $ cacheItem = $ this ->internalCacheInstance ->getItem ($ key );
0 commit comments