Skip to content

Commit f121b5a

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 1f3c96b + 9fc3778 commit f121b5a

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

Cache/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.

Cache/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 {};

EventDispatcher/EventDispatcherInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ interface EventDispatcherInterface extends PsrEventDispatcherInterface
2929
*
3030
* @return T The passed $event MUST be returned
3131
*/
32-
public function dispatch(object $event, string $eventName = null): object;
32+
public function dispatch(object $event, ?string $eventName = null): object;
3333
}

HttpClient/HttpClientInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function request(string $method, string $url, array $options = []): Respo
9090
* @param ResponseInterface|iterable<array-key, ResponseInterface> $responses One or more responses created by the current HTTP client
9191
* @param float|null $timeout The idle timeout before yielding timeout chunks
9292
*/
93-
public function stream(ResponseInterface|iterable $responses, float $timeout = null): ResponseStreamInterface;
93+
public function stream(ResponseInterface|iterable $responses, ?float $timeout = null): ResponseStreamInterface;
9494

9595
/**
9696
* Returns a new instance of the client with new default options.

HttpClient/ResponseInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@ public function cancel(): void;
105105
* @return mixed An array of all available info, or one of them when $type is
106106
* provided, or null when an unsupported type is requested
107107
*/
108-
public function getInfo(string $type = null): mixed;
108+
public function getInfo(?string $type = null): mixed;
109109
}

Translation/TranslatableInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
*/
1717
interface TranslatableInterface
1818
{
19-
public function trans(TranslatorInterface $translator, string $locale = null): string;
19+
public function trans(TranslatorInterface $translator, ?string $locale = null): string;
2020
}

Translation/TranslatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ interface TranslatorInterface
5959
*
6060
* @throws \InvalidArgumentException If the locale contains invalid characters
6161
*/
62-
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string;
62+
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string;
6363

6464
/**
6565
* Returns the default locale.

Translation/TranslatorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getLocale(): string
3535
return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
3636
}
3737

38-
public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null): string
38+
public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string
3939
{
4040
if (null === $id || '' === $id) {
4141
return '';

0 commit comments

Comments
 (0)