Skip to content

Commit 2fc70fd

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 3c96a89 + 515326d commit 2fc70fd

29 files changed

+39
-39
lines changed

Channel/AbstractChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class AbstractChannel implements ChannelInterface
2323
protected ?TransportInterface $transport;
2424
protected ?MessageBusInterface $bus;
2525

26-
public function __construct(TransportInterface $transport = null, MessageBusInterface $bus = null)
26+
public function __construct(?TransportInterface $transport = null, ?MessageBusInterface $bus = null)
2727
{
2828
if (null === $transport && null === $bus) {
2929
throw new LogicException(sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));

Channel/BrowserChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
) {
2929
}
3030

31-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
31+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
3232
{
3333
if (null === $request = $this->stack->getCurrentRequest()) {
3434
return;

Channel/ChannelInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
interface ChannelInterface
2121
{
22-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void;
22+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void;
2323

2424
public function supports(Notification $notification, RecipientInterface $recipient): bool;
2525
}

Channel/ChatChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ChatChannel extends AbstractChannel
2323
{
24-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
24+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
2525
{
2626
$message = null;
2727
if ($notification instanceof ChatNotificationInterface) {

Channel/EmailChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class EmailChannel implements ChannelInterface
3434
public function __construct(
3535
private ?TransportInterface $transport = null,
3636
private ?MessageBusInterface $bus = null,
37-
string $from = null,
37+
?string $from = null,
3838
private ?Envelope $envelope = null,
3939
) {
4040
if (null === $transport && null === $bus) {
@@ -47,7 +47,7 @@ public function __construct(
4747
/**
4848
* @param EmailRecipientInterface $recipient
4949
*/
50-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
50+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
5151
{
5252
$message = null;
5353
if ($notification instanceof EmailNotificationInterface) {

Channel/PushChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class PushChannel extends AbstractChannel
2323
{
24-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
24+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
2525
{
2626
$message = null;
2727
if ($notification instanceof PushNotificationInterface) {

Channel/SmsChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SmsChannel extends AbstractChannel
2525
/**
2626
* @param SmsRecipientInterface $recipient
2727
*/
28-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
28+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
2929
{
3030
$message = null;
3131
if ($notification instanceof SmsNotificationInterface) {

DataCollector/NotificationDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(
2727
) {
2828
}
2929

30-
public function collect(Request $request, Response $response, \Throwable $exception = null): void
30+
public function collect(Request $request, Response $response, ?\Throwable $exception = null): void
3131
{
3232
$this->data['events'] = $this->logger->getEvents();
3333
}

Event/NotificationEvents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getTransports(): array
3535
/**
3636
* @return MessageEvent[]
3737
*/
38-
public function getEvents(string $name = null): array
38+
public function getEvents(?string $name = null): array
3939
{
4040
if (null === $name) {
4141
return $this->events;
@@ -54,7 +54,7 @@ public function getEvents(string $name = null): array
5454
/**
5555
* @return MessageInterface[]
5656
*/
57-
public function getMessages(string $name = null): array
57+
public function getMessages(?string $name = null): array
5858
{
5959
$events = $this->getEvents($name);
6060
$messages = [];

Exception/IncompleteDsnException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class IncompleteDsnException extends InvalidArgumentException
1919
public function __construct(
2020
string $message,
2121
private ?string $dsn = null,
22-
\Throwable $previous = null,
22+
?\Throwable $previous = null,
2323
) {
2424
if ($dsn) {
2525
$message = sprintf('Invalid "%s" notifier DSN: %s', $dsn, $message);

0 commit comments

Comments
 (0)