Skip to content

Commit 1d6dc69

Browse files
Add return types - batch 3/n
1 parent 31d3865 commit 1d6dc69

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

EventListener/NotificationLoggerListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getEvents(): NotificationEvents
4646
return $this->events;
4747
}
4848

49-
public static function getSubscribedEvents()
49+
public static function getSubscribedEvents(): array
5050
{
5151
return [
5252
MessageEvent::class => ['onNotification', -255],

EventListener/SendFailedMessageToNotifierListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function onMessageFailed(WorkerMessageFailedEvent $event)
4747
$this->notifier->send($notification, ...$this->notifier->getAdminRecipients());
4848
}
4949

50-
public static function getSubscribedEvents()
50+
public static function getSubscribedEvents(): array
5151
{
5252
return [
5353
WorkerMessageFailedEvent::class => 'onMessageFailed',

Notification/Notification.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static function fromThrowable(\Throwable $exception, array $channels = []
6666
/**
6767
* @return $this
6868
*/
69-
public function subject(string $subject): self
69+
public function subject(string $subject): static
7070
{
7171
$this->subject = $subject;
7272

@@ -81,7 +81,7 @@ public function getSubject(): string
8181
/**
8282
* @return $this
8383
*/
84-
public function content(string $content): self
84+
public function content(string $content): static
8585
{
8686
$this->content = $content;
8787

@@ -96,7 +96,7 @@ public function getContent(): string
9696
/**
9797
* @return $this
9898
*/
99-
public function importance(string $importance): self
99+
public function importance(string $importance): static
100100
{
101101
$this->importance = $importance;
102102

@@ -113,7 +113,7 @@ public function getImportance(): string
113113
*
114114
* @return $this
115115
*/
116-
public function importanceFromLogLevelName(string $level): self
116+
public function importanceFromLogLevelName(string $level): static
117117
{
118118
$level = self::LEVELS[strtolower($level)];
119119
$this->importance = $level >= 500 ? self::IMPORTANCE_URGENT : ($level >= 400 ? self::IMPORTANCE_HIGH : self::IMPORTANCE_LOW);
@@ -124,7 +124,7 @@ public function importanceFromLogLevelName(string $level): self
124124
/**
125125
* @return $this
126126
*/
127-
public function emoji(string $emoji): self
127+
public function emoji(string $emoji): static
128128
{
129129
$this->emoji = $emoji;
130130

@@ -149,7 +149,7 @@ public function getExceptionAsString(): string
149149
/**
150150
* @return $this
151151
*/
152-
public function channels(array $channels): self
152+
public function channels(array $channels): static
153153
{
154154
$this->channels = $channels;
155155

Recipient/Recipient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(string $email = '', string $phone = '')
3535
/**
3636
* @return $this
3737
*/
38-
public function email(string $email): self
38+
public function email(string $email): static
3939
{
4040
$this->email = $email;
4141

@@ -47,7 +47,7 @@ public function email(string $email): self
4747
*
4848
* @return $this
4949
*/
50-
public function phone(string $phone): self
50+
public function phone(string $phone): static
5151
{
5252
$this->phone = $phone;
5353

Transport/AbstractTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(HttpClientInterface $client = null, EventDispatcherI
5151
/**
5252
* @return $this
5353
*/
54-
public function setHost(?string $host): self
54+
public function setHost(?string $host): static
5555
{
5656
$this->host = $host;
5757

@@ -61,7 +61,7 @@ public function setHost(?string $host): self
6161
/**
6262
* @return $this
6363
*/
64-
public function setPort(?int $port): self
64+
public function setPort(?int $port): static
6565
{
6666
$this->port = $port;
6767

0 commit comments

Comments
 (0)