@@ -60,7 +60,7 @@ class Psr6Store implements Psr6StoreInterface, ClearableInterface
6060 private string $ hashAlgorithm ;
6161
6262 /**
63- * When creating a Psr6Store you can configure a number options.
63+ * When creating a Psr6Store you can configure a number of options.
6464 * See the README for a list of all available options and their description.
6565 */
6666 public function __construct (array $ options = [])
@@ -100,7 +100,7 @@ public function __construct(array $options = [])
100100 $ this ->options = $ resolver ->resolve ($ options );
101101 $ this ->cache = $ this ->options ['cache ' ];
102102 $ this ->lockFactory = $ this ->options ['lock_factory ' ];
103- $ this ->hashAlgorithm = version_compare ( PHP_VERSION , ' 8.1.0 ' , ' >= ' ) ? 'xxh128 ' : 'sha256 ' ;
103+ $ this ->hashAlgorithm = \ PHP_VERSION_ID >= 80100 ? 'xxh128 ' : 'sha256 ' ;
104104 }
105105
106106 public function lookup (Request $ request ): ?Response
@@ -227,7 +227,7 @@ public function unlock(Request $request): bool
227227
228228 try {
229229 $ this ->locks [$ cacheKey ]->release ();
230- } catch (LockReleasingException $ e ) {
230+ } catch (LockReleasingException ) {
231231 return false ;
232232 } finally {
233233 unset($ this ->locks [$ cacheKey ]);
@@ -260,7 +260,7 @@ public function cleanup(): void
260260 foreach ($ this ->locks as $ lock ) {
261261 $ lock ->release ();
262262 }
263- } catch (LockReleasingException $ e ) {
263+ } catch (LockReleasingException ) {
264264 // noop
265265 } finally {
266266 $ this ->locks = [];
@@ -281,7 +281,7 @@ public function invalidateTags(array $tags): bool
281281
282282 try {
283283 return $ this ->cache ->invalidateTags ($ tags );
284- } catch (CacheInvalidArgumentException $ e ) {
284+ } catch (CacheInvalidArgumentException ) {
285285 return false ;
286286 }
287287 }
@@ -508,13 +508,13 @@ private function restoreResponse(array $cacheData): ?Response
508508
509509 // BC
510510 if (\is_string ($ value )) {
511- $ value = ['expires ' => 0 , ' contents ' => $ value ];
511+ $ value = ['contents ' => $ value ];
512512 }
513513
514514 if ($ this ->isBinaryFileResponseContentDigest ($ cacheData ['headers ' ]['x-content-digest ' ][0 ])) {
515515 try {
516516 $ file = new File ($ value ['contents ' ]);
517- } catch (FileNotFoundException $ e ) {
517+ } catch (FileNotFoundException ) {
518518 return null ;
519519 }
520520
@@ -542,7 +542,7 @@ private function getDefaultLockStore(string $cacheDir): PersistingStoreInterface
542542 {
543543 try {
544544 return new SemaphoreStore ();
545- } catch (LockInvalidArgumentException $ exception ) {
545+ } catch (LockInvalidArgumentException ) {
546546 return new FlockStore ($ cacheDir );
547547 }
548548 }
0 commit comments