Skip to content

Commit 1c6c7a7

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 1eaec83 + 18daf06 commit 1c6c7a7

37 files changed

+47
-47
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 $transport;
2424
protected $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
@@ -32,7 +32,7 @@ public function __construct(RequestStack $stack, FlashMessageImportanceMapperInt
3232
$this->mapper = $mapper;
3333
}
3434

35-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
35+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
3636
{
3737
if (null === $request = $this->stack->getCurrentRequest()) {
3838
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
private string|Address|null $from;
3535
private ?Envelope $envelope;
3636

37-
public function __construct(TransportInterface $transport = null, MessageBusInterface $bus = null, string $from = null, Envelope $envelope = null)
37+
public function __construct(?TransportInterface $transport = null, ?MessageBusInterface $bus = null, ?string $from = null, ?Envelope $envelope = null)
3838
{
3939
if (null === $transport && null === $bus) {
4040
throw new LogicException(sprintf('"%s" needs a Transport or a Bus but both cannot be "null".', static::class));
@@ -49,7 +49,7 @@ public function __construct(TransportInterface $transport = null, MessageBusInte
4949
/**
5050
* @param EmailRecipientInterface $recipient
5151
*/
52-
public function notify(Notification $notification, RecipientInterface $recipient, string $transportName = null): void
52+
public function notify(Notification $notification, RecipientInterface $recipient, ?string $transportName = null): void
5353
{
5454
$message = null;
5555
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) {

Chatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class Chatter implements ChatterInterface
2727
private ?MessageBusInterface $bus;
2828
private ?EventDispatcherInterface $dispatcher;
2929

30-
public function __construct(TransportInterface $transport, MessageBusInterface $bus = null, EventDispatcherInterface $dispatcher = null)
30+
public function __construct(TransportInterface $transport, ?MessageBusInterface $bus = null, ?EventDispatcherInterface $dispatcher = null)
3131
{
3232
$this->transport = $transport;
3333
$this->bus = $bus;

DataCollector/NotificationDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(NotificationLoggerListener $logger)
2929
$this->logger = $logger;
3030
}
3131

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

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 = [];

0 commit comments

Comments
 (0)