Skip to content

Commit

Permalink
Apply type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean85 committed Sep 13, 2023
1 parent 0b4e1be commit 21a15ce
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableCacheAdapterForV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Tracing/Doctrine/DBAL/TracingDriverConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
5 changes: 5 additions & 0 deletions tests/EventListener/Fixtures/UserWithoutIdentifierStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ public function getSalt(): ?string
public function eraseCredentials(): void
{
}

public function getUserIdentifier(): string
{
return $this->getUsername();
}
}

0 comments on commit 21a15ce

Please sign in to comment.