Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing method setCallbackWrapper #841

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/Tracing/Cache/TraceableCacheAdapterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,17 @@
}
}
}

/**
* @phpstan-param \Closure(CacheItem): CacheItem $callback
* @phpstan-param string $key
*
* @phpstan-return callable(): CacheItem
*/
private function setCallbackWrapper(callable $callback, string $key): callable

Check warning on line 200 in src/Tracing/Cache/TraceableCacheAdapterTrait.php

View check run for this annotation

Codecov / codecov/patch

src/Tracing/Cache/TraceableCacheAdapterTrait.php#L200

Added line #L200 was not covered by tests
{
return function () use ($callback, $key): CacheItem {
return $callback($this->decoratedAdapter->getItem($key));
};

Check warning on line 204 in src/Tracing/Cache/TraceableCacheAdapterTrait.php

View check run for this annotation

Codecov / codecov/patch

src/Tracing/Cache/TraceableCacheAdapterTrait.php#L202-L204

Added lines #L202 - L204 were not covered by tests
}
}
Loading