From 8c8487895702d54809dc4c613a011958a36f5bb8 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 7 Sep 2024 15:41:50 +0900 Subject: [PATCH] Suppress unused parameter warnings in NullTagAwareAdapter Add suppression for unused parameter warnings in NullTagAwareAdapter class. Unset parameters in getItem() and clear() methods to prevent IDE warnings and improve code clarity. --- src/NullTagAwareAdapter.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/NullTagAwareAdapter.php b/src/NullTagAwareAdapter.php index a9226863..a700919d 100644 --- a/src/NullTagAwareAdapter.php +++ b/src/NullTagAwareAdapter.php @@ -8,10 +8,12 @@ use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface; use Symfony\Component\Cache\CacheItem; +/** @SuppressWarnings UnusedFormalParameter */ final class NullTagAwareAdapter implements TagAwareAdapterInterface { public function getItem(mixed $key): CacheItem { + unset($key); $item = new CacheItem(); $item->set(null); $item->tag(''); @@ -27,6 +29,8 @@ public function getItems(array $keys = []): iterable public function clear(string $prefix = ''): bool { + unset($prefix); + return true; }