@@ -40,10 +40,16 @@ trait DriverBaseTrait
40
40
use ClassNamespaceResolverTrait;
41
41
use EventManagerDispatcherTrait;
42
42
43
+ /**
44
+ * @var string[]
45
+ */
43
46
protected static array $ cacheItemClasses = [];
44
47
45
48
protected ConfigurationOptionInterface $ config ;
46
49
50
+ /**
51
+ * @var object|array<mixed>|null
52
+ */
47
53
protected object |array |null $ instance ;
48
54
49
55
protected string $ driverName ;
@@ -136,7 +142,7 @@ public static function getItemClass(): string
136
142
/**
137
143
* @param ExtendedCacheItemInterface $item
138
144
* @param bool $stringifyDate
139
- * @return array
145
+ * @return array<string, mixed>
140
146
* @throws PhpfastcacheLogicException
141
147
*/
142
148
public function driverPreWrap (ExtendedCacheItemInterface $ item , bool $ stringifyDate = false ): array
@@ -191,7 +197,7 @@ public function setConfig(ConfigurationOptionInterface $config): static
191
197
}
192
198
193
199
/**
194
- * @param array $wrapper
200
+ * @param array<string, mixed> $wrapper
195
201
* @return mixed
196
202
* @throws \Exception
197
203
*/
@@ -201,7 +207,7 @@ public function driverUnwrapData(array $wrapper): mixed
201
207
}
202
208
203
209
/**
204
- * @param array $wrapper
210
+ * @param array<string, mixed> $wrapper
205
211
* @return DateTimeInterface
206
212
*/
207
213
public function driverUnwrapEdate (array $ wrapper ): \DateTimeInterface
@@ -214,7 +220,7 @@ public function driverUnwrapEdate(array $wrapper): \DateTimeInterface
214
220
}
215
221
216
222
/**
217
- * @param array $wrapper
223
+ * @param array<string, mixed> $wrapper
218
224
* @return DateTimeInterface|null
219
225
*/
220
226
public function driverUnwrapCdate (array $ wrapper ): ?\DateTimeInterface
@@ -227,7 +233,7 @@ public function driverUnwrapCdate(array $wrapper): ?\DateTimeInterface
227
233
}
228
234
229
235
/**
230
- * @param array $wrapper
236
+ * @param array<string, mixed> $wrapper
231
237
* @return DateTimeInterface|null
232
238
*/
233
239
public function driverUnwrapMdate (array $ wrapper ): ?\DateTimeInterface
@@ -251,10 +257,10 @@ public function getInstanceId(): string
251
257
* Encode data types such as object/array
252
258
* for driver that does not support
253
259
* non-scalar value
254
- * @param $data
260
+ * @param mixed $data
255
261
* @return string
256
262
*/
257
- protected function encode ($ data ): string
263
+ protected function encode (mixed $ data ): string
258
264
{
259
265
return \serialize ($ data );
260
266
}
0 commit comments