Skip to content

Commit a9fe419

Browse files
Merge branch '7.0' into 7.1
* 7.0: List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value [Messenger][AmazonSqs] Allow async-aws/sqs version 2
2 parents b0393e3 + 2c9db65 commit a9fe419

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎CacheInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ interface CacheInterface
4444
*
4545
* @throws InvalidArgumentException When $key is not valid or when $beta is negative
4646
*/
47-
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed;
47+
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed;
4848

4949
/**
5050
* Removes an item from the pool.

‎CacheTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class_exists(InvalidArgumentException::class);
2525
*/
2626
trait CacheTrait
2727
{
28-
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
28+
public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
2929
{
3030
return $this->doGet($this, $key, $callback, $beta, $metadata);
3131
}
@@ -35,7 +35,7 @@ public function delete(string $key): bool
3535
return $this->deleteItem($key);
3636
}
3737

38-
private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, array &$metadata = null, LoggerInterface $logger = null): mixed
38+
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) {
4141
throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException {};

0 commit comments

Comments
 (0)