22
33namespace LdapRecord \Query ;
44
5- use DateInterval ;
65use Psr \SimpleCache \CacheInterface ;
76
87class ArrayCacheStore implements CacheInterface
@@ -17,7 +16,7 @@ class ArrayCacheStore implements CacheInterface
1716 /**
1817 * {@inheritdoc}
1918 */
20- public function get (string $ key , mixed $ default = null ): mixed
19+ public function get ($ key , $ default = null ): mixed
2120 {
2221 if (! isset ($ this ->storage [$ key ])) {
2322 return $ default ;
@@ -39,7 +38,7 @@ public function get(string $key, mixed $default = null): mixed
3938 /**
4039 * {@inheritdoc}
4140 */
42- public function set (string $ key , mixed $ value , null | int | DateInterval $ ttl = null ): bool
41+ public function set ($ key , $ value , $ ttl = null ): bool
4342 {
4443 $ this ->storage [$ key ] = [
4544 'value ' => $ value ,
@@ -52,23 +51,23 @@ public function set(string $key, mixed $value, null|int|DateInterval $ttl = null
5251 /**
5352 * Get the expiration time of the key.
5453 */
55- protected function calculateExpiration (int $ seconds = null ): int
54+ protected function calculateExpiration ($ seconds = null ): int
5655 {
5756 return $ this ->toTimestamp ($ seconds );
5857 }
5958
6059 /**
6160 * Get the UNIX timestamp for the given number of seconds.
6261 */
63- protected function toTimestamp (int $ seconds = null ): int
62+ protected function toTimestamp ($ seconds = null ): int
6463 {
6564 return $ seconds > 0 ? $ this ->availableAt ($ seconds ) : 0 ;
6665 }
6766
6867 /**
6968 * {@inheritdoc}
7069 */
71- public function delete (string $ key ): bool
70+ public function delete ($ key ): bool
7271 {
7372 unset($ this ->storage [$ key ]);
7473
@@ -88,7 +87,7 @@ public function clear(): bool
8887 /**
8988 * {@inheritdoc}
9089 */
91- public function getMultiple (iterable $ keys , mixed $ default = null ): iterable
90+ public function getMultiple ($ keys , $ default = null ): iterable
9291 {
9392 $ values = [];
9493
@@ -102,7 +101,7 @@ public function getMultiple(iterable $keys, mixed $default = null): iterable
102101 /**
103102 * {@inheritdoc}
104103 */
105- public function setMultiple (iterable $ values , null | int | DateInterval $ ttl = null ): bool
104+ public function setMultiple ($ values , $ ttl = null ): bool
106105 {
107106 foreach ($ values as $ key => $ value ) {
108107 $ this ->set ($ key , $ value , $ ttl );
@@ -114,7 +113,7 @@ public function setMultiple(iterable $values, null|int|DateInterval $ttl = null)
114113 /**
115114 * {@inheritdoc}
116115 */
117- public function deleteMultiple (iterable $ keys ): bool
116+ public function deleteMultiple ($ keys ): bool
118117 {
119118 foreach ($ keys as $ key ) {
120119 $ this ->delete ($ key );
@@ -126,7 +125,7 @@ public function deleteMultiple(iterable $keys): bool
126125 /**
127126 * {@inheritdoc}
128127 */
129- public function has (string $ key ): bool
128+ public function has ($ key ): bool
130129 {
131130 return isset ($ this ->storage [$ key ]);
132131 }
0 commit comments