Skip to content

Commit b26d00f

Browse files
committed
Prefix all sprintf() calls
1 parent 657a3a1 commit b26d00f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: CacheTrait.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function delete(string $key): bool
3838
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null, ?LoggerInterface $logger = null): mixed
3939
{
4040
if (0 > $beta ??= 1.0) {
41-
throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException {};
41+
throw new class(\sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException {};
4242
}
4343

4444
$item = $pool->getItem($key);
@@ -54,7 +54,7 @@ private function doGet(CacheItemPoolInterface $pool, string $key, callable $call
5454
$item->expiresAt(null);
5555
$logger?->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [
5656
'key' => $key,
57-
'delta' => sprintf('%.1f', $expiry - $now),
57+
'delta' => \sprintf('%.1f', $expiry - $now),
5858
]);
5959
}
6060
}

0 commit comments

Comments
 (0)