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
4444 private string $ exceptionAsString = '' ;
4545 private string $ importance = self ::IMPORTANCE_HIGH ;
4646
47+ /**
48+ * @param list<string> $channels
49+ */
4750 public function __construct (string $ subject = '' , array $ channels = [])
4851 {
4952 $ this ->subject = $ subject ;
5053 $ this ->channels = $ channels ;
5154 }
5255
56+ /**
57+ * @param list<string> $channels
58+ */
5359 public static function fromThrowable (\Throwable $ exception , array $ channels = []): self
5460 {
5561 $ parts = explode ('\\' , \get_class ($ exception ));
@@ -147,6 +153,8 @@ public function getExceptionAsString(): string
147153 }
148154
149155 /**
156+ * @param list<string> $channels
157+ *
150158 * @return $this
151159 */
152160 public function channels (array $ channels ): static
@@ -156,6 +164,9 @@ public function channels(array $channels): static
156164 return $ this ;
157165 }
158166
167+ /**
168+ * @return list<string>
169+ */
159170 public function getChannels (RecipientInterface $ recipient ): array
160171 {
161172 return $ this ->channels ;
Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ public function getAdminRecipients(): array
6565 return $ this ->adminRecipients ;
6666 }
6767
68+ /**
69+ * @return iterable<ChannelInterface, string|null>
70+ */
6871 private function getChannels (Notification $ notification , RecipientInterface $ recipient ): iterable
6972 {
7073 $ channels = $ notification ->getChannels ($ recipient );
You can’t perform that action at this time.
0 commit comments