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 1 commit
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
Next Next commit
fix: add missing method setCallbackWrapper
  • Loading branch information
shakaran committed May 3, 2024
commit 092e3a04a8be7666019f01fc10e9a1bbda4244f6
14 changes: 14 additions & 0 deletions src/Tracing/Cache/TraceableCacheAdapterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,18 @@
}
}
}

/**
* @phpstan-template TResult
*
* @phpstan-param \Closure(): TResult $callback
*
* @phpstan-return TResult

Check failure on line 199 in src/Tracing/Cache/TraceableCacheAdapterTrait.php

View workflow job for this annotation

GitHub Actions / Psalm

InvalidReturnType

src/Tracing/Cache/TraceableCacheAdapterTrait.php:199:24: InvalidReturnType: The declared return type 'TResult:fn-sentry\sentrybundle\tracing\cache\traceablecacheadaptertrait::setcallbackwrapper as mixed' for Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapterTrait::setCallbackWrapper is incorrect, got 'impure-Closure():TResult:fn-sentry\sentrybundle\tracing\cache\traceablecacheadaptertrait::setcallbackwrapper as mixed' (see https://psalm.dev/011)
*/
private function setCallbackWrapper(callable $callback, string $key): callable

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

View check run for this annotation

Codecov / codecov/patch

src/Tracing/Cache/TraceableCacheAdapterTrait.php#L201

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

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

View workflow job for this annotation

GitHub Actions / Psalm

TooManyArguments

src/Tracing/Cache/TraceableCacheAdapterTrait.php:204:20: TooManyArguments: Too many arguments for - expecting 0 but saw 1 (see https://psalm.dev/026)
};

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

View check run for this annotation

Codecov / codecov/patch

src/Tracing/Cache/TraceableCacheAdapterTrait.php#L203-L205

Added lines #L203 - L205 were not covered by tests
}
}
Loading