Skip to content

Commit

Permalink
Suppress unused parameter warnings in NullTagAwareAdapter
Browse files Browse the repository at this point in the history
Add suppression for unused parameter warnings in NullTagAwareAdapter class. Unset parameters in getItem() and clear() methods to prevent IDE warnings and improve code clarity.
  • Loading branch information
koriym committed Sep 7, 2024
1 parent ceb15e3 commit 8c84878
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NullTagAwareAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand All @@ -27,6 +29,8 @@ public function getItems(array $keys = []): iterable

public function clear(string $prefix = ''): bool
{
unset($prefix);

return true;
}

Expand Down

0 comments on commit 8c84878

Please sign in to comment.