@@ -40,10 +40,16 @@ trait DriverBaseTrait
4040 use ClassNamespaceResolverTrait;
4141 use EventManagerDispatcherTrait;
4242
43+ /**
44+ * @var string[]
45+ */
4346 protected static array $ cacheItemClasses = [];
4447
4548 protected ConfigurationOptionInterface $ config ;
4649
50+ /**
51+ * @var object|array<mixed>|null
52+ */
4753 protected object |array |null $ instance ;
4854
4955 protected string $ driverName ;
@@ -136,7 +142,7 @@ public static function getItemClass(): string
136142 /**
137143 * @param ExtendedCacheItemInterface $item
138144 * @param bool $stringifyDate
139- * @return array
145+ * @return array<string, mixed>
140146 * @throws PhpfastcacheLogicException
141147 */
142148 public function driverPreWrap (ExtendedCacheItemInterface $ item , bool $ stringifyDate = false ): array
@@ -191,7 +197,7 @@ public function setConfig(ConfigurationOptionInterface $config): static
191197 }
192198
193199 /**
194- * @param array $wrapper
200+ * @param array<string, mixed> $wrapper
195201 * @return mixed
196202 * @throws \Exception
197203 */
@@ -201,7 +207,7 @@ public function driverUnwrapData(array $wrapper): mixed
201207 }
202208
203209 /**
204- * @param array $wrapper
210+ * @param array<string, mixed> $wrapper
205211 * @return DateTimeInterface
206212 */
207213 public function driverUnwrapEdate (array $ wrapper ): \DateTimeInterface
@@ -214,7 +220,7 @@ public function driverUnwrapEdate(array $wrapper): \DateTimeInterface
214220 }
215221
216222 /**
217- * @param array $wrapper
223+ * @param array<string, mixed> $wrapper
218224 * @return DateTimeInterface|null
219225 */
220226 public function driverUnwrapCdate (array $ wrapper ): ?\DateTimeInterface
@@ -227,7 +233,7 @@ public function driverUnwrapCdate(array $wrapper): ?\DateTimeInterface
227233 }
228234
229235 /**
230- * @param array $wrapper
236+ * @param array<string, mixed> $wrapper
231237 * @return DateTimeInterface|null
232238 */
233239 public function driverUnwrapMdate (array $ wrapper ): ?\DateTimeInterface
@@ -251,10 +257,10 @@ public function getInstanceId(): string
251257 * Encode data types such as object/array
252258 * for driver that does not support
253259 * non-scalar value
254- * @param $data
260+ * @param mixed $data
255261 * @return string
256262 */
257- protected function encode ($ data ): string
263+ protected function encode (mixed $ data ): string
258264 {
259265 return \serialize ($ data );
260266 }
0 commit comments