File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,18 @@ class Notification
44
44
private string $ exceptionAsString = '' ;
45
45
private string $ importance = self ::IMPORTANCE_HIGH ;
46
46
47
+ /**
48
+ * @param list<string> $channels
49
+ */
47
50
public function __construct (string $ subject = '' , array $ channels = [])
48
51
{
49
52
$ this ->subject = $ subject ;
50
53
$ this ->channels = $ channels ;
51
54
}
52
55
56
+ /**
57
+ * @param list<string> $channels
58
+ */
53
59
public static function fromThrowable (\Throwable $ exception , array $ channels = []): self
54
60
{
55
61
$ parts = explode ('\\' , \get_class ($ exception ));
@@ -147,6 +153,8 @@ public function getExceptionAsString(): string
147
153
}
148
154
149
155
/**
156
+ * @param list<string> $channels
157
+ *
150
158
* @return $this
151
159
*/
152
160
public function channels (array $ channels ): static
@@ -156,6 +164,9 @@ public function channels(array $channels): static
156
164
return $ this ;
157
165
}
158
166
167
+ /**
168
+ * @return list<string>
169
+ */
159
170
public function getChannels (RecipientInterface $ recipient ): array
160
171
{
161
172
return $ this ->channels ;
Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ public function getAdminRecipients(): array
65
65
return $ this ->adminRecipients ;
66
66
}
67
67
68
+ /**
69
+ * @return iterable<ChannelInterface, string|null>
70
+ */
68
71
private function getChannels (Notification $ notification , RecipientInterface $ recipient ): iterable
69
72
{
70
73
$ channels = $ notification ->getChannels ($ recipient );
You can’t perform that action at this time.
0 commit comments