diff --git a/src/Tracing/Cache/TraceableCacheAdapterForV2.php b/src/Tracing/Cache/TraceableCacheAdapterForV2.php index 7a5b57c9..6a0bdde5 100644 --- a/src/Tracing/Cache/TraceableCacheAdapterForV2.php +++ b/src/Tracing/Cache/TraceableCacheAdapterForV2.php @@ -40,7 +40,7 @@ public function __construct(HubInterface $hub, AdapterInterface $decoratedAdapte * * @return mixed */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) + public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) { if (!$this->decoratedAdapter instanceof CacheInterface) { diff --git a/src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php b/src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php index a89d911f..f9df4400 100644 --- a/src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php +++ b/src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php @@ -41,7 +41,7 @@ public function __construct(HubInterface $hub, TagAwareAdapterInterface $decorat * * @return mixed */ - public function get(string $key, callable $callback, float $beta = null, array &$metadata = null) + public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed { return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) { if (!$this->decoratedAdapter instanceof CacheInterface) { diff --git a/tests/EventListener/Fixtures/UserWithoutIdentifierStub.php b/tests/EventListener/Fixtures/UserWithoutIdentifierStub.php index b547df5d..dcc44618 100644 --- a/tests/EventListener/Fixtures/UserWithoutIdentifierStub.php +++ b/tests/EventListener/Fixtures/UserWithoutIdentifierStub.php @@ -31,4 +31,9 @@ public function getSalt(): ?string public function eraseCredentials(): void { } + + public function getUserIdentifier(): string + { + return $this->getUsername(); + } }