@@ -90,7 +90,7 @@ public function clear(): void
9090 }
9191
9292 break ;
93- case $ this -> adapter instanceof AdapterInterface :
93+ default :
9494 $ this ->adapter ->clear ();
9595
9696 break ;
@@ -114,14 +114,15 @@ private function getCacheAdapter(AdapterInterface $adapter): AdapterInterface
114114 {
115115 if ($ adapter instanceof CacheDecorator) {
116116 // Do not declare function as static
117- $ func = \Closure::bind (fn () => $ adapter ->decorated , $ adapter , $ adapter ::class);
117+ // @phpstan-ignore-next-line
118+ $ func = \Closure::bind (fn () => $ adapter ->decorated , $ adapter , $ adapter ::class);
118119
119120 return $ this ->getCacheAdapter ($ func ());
120121 }
121122
122123 if ($ adapter instanceof TagAwareAdapter || $ adapter instanceof TraceableAdapter) {
123124 // Do not declare function as static
124- $ func = \Closure::bind (fn () => $ adapter ->pool , $ adapter , $ adapter ::class);
125+ $ func = \Closure::bind (fn () => $ adapter ->pool , $ adapter , $ adapter ::class);
125126
126127 return $ this ->getCacheAdapter ($ func ());
127128 }
@@ -132,25 +133,25 @@ private function getCacheAdapter(AdapterInterface $adapter): AdapterInterface
132133 private function getRedis (AdapterInterface $ adapter ): \Redis
133134 {
134135 if ($ adapter instanceof RedisTagAwareAdapter) {
135- $ redisProxyGetter = \Closure::bind (fn () => $ adapter ->redis , $ adapter , RedisTagAwareAdapter::class);
136+ $ redisProxyGetter = \Closure::bind (fn () => $ adapter ->redis , $ adapter , RedisTagAwareAdapter::class);
136137 } else {
137138 // @phpstan-ignore-next-line
138- $ redisProxyGetter = \Closure::bind (fn () => $ adapter ->redis , $ adapter , RedisAdapter::class);
139+ $ redisProxyGetter = \Closure::bind (fn () => $ adapter ->redis , $ adapter , RedisAdapter::class);
139140 }
140141
141142 return $ redisProxyGetter ();
142143 }
143144
144145 private function getPathFromFilesystemAdapter (FilesystemAdapter $ adapter ): string
145146 {
146- $ getter = \Closure::bind (fn () => $ adapter ->directory , $ adapter , $ adapter ::class);
147+ $ getter = \Closure::bind (fn () => $ adapter ->directory , $ adapter , $ adapter ::class);
147148
148149 return $ getter ();
149150 }
150151
151152 private function getPathOfFilesAdapter (PhpFilesAdapter $ adapter ): string
152153 {
153- $ getter = \Closure::bind (fn () => $ adapter ->directory , $ adapter , $ adapter ::class);
154+ $ getter = \Closure::bind (fn () => $ adapter ->directory , $ adapter , $ adapter ::class);
154155
155156 return $ getter ();
156157 }
0 commit comments