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/src/Tracing/Doctrine/DBAL/TracingDriverConnection.php b/src/Tracing/Doctrine/DBAL/TracingDriverConnection.php index b23dff90..82ede117 100644 --- a/src/Tracing/Doctrine/DBAL/TracingDriverConnection.php +++ b/src/Tracing/Doctrine/DBAL/TracingDriverConnection.php @@ -120,7 +120,7 @@ public function query(?string $sql = null, ...$args): Result * * @return mixed */ - public function quote($value, $type = ParameterType::STRING) + public function quote($value, $type = ParameterType::STRING): mixed { return $this->decoratedConnection->quote($value, $type); } @@ -140,7 +140,7 @@ public function exec($sql): int * * @return string|int|false */ - public function lastInsertId($name = null) + public function lastInsertId($name = null): string|int|false { return $this->decoratedConnection->lastInsertId($name); } diff --git a/src/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnection.php b/src/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnection.php index de1270bd..fea68257 100644 --- a/src/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnection.php +++ b/src/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnection.php @@ -54,7 +54,7 @@ public function query(?string $sql = null, ...$args): Result * * @return mixed */ - public function quote($value, $type = ParameterType::STRING) + public function quote($value, $type = ParameterType::STRING): mixed { return $this->decoratedConnection->quote($value, $type); } @@ -72,7 +72,7 @@ public function exec($sql): int * * @return string|int|false */ - public function lastInsertId($name = null) + public function lastInsertId($name = null): string|int|false { return $this->decoratedConnection->lastInsertId($name); } 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(); + } }