Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2c9db65

Browse files
Merge branch '6.3' into 6.4
* 6.3: 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
2 parents 1d74b12 + 0220e72 commit 2c9db65

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)

AltStyle によって変換されたページ (->オリジナル) /