@@ -12,7 +12,6 @@ class FcmMessage implements Message
1212{
1313 use Macroable;
1414
15-
1615 /**
1716 * Create a new message instance.
1817 */
@@ -29,7 +28,6 @@ public function __construct(
2928 //
3029 }
3130
32-
3331 /**
3432 * Create a new message instance.
3533 */
@@ -38,7 +36,6 @@ public static function create(...$args): static
3836 return new static (...$ args );
3937 }
4038
41-
4239 /**
4340 * Set the message name.
4441 */
@@ -49,7 +46,9 @@ public function name(?string $name): self
4946 return $ this ;
5047 }
5148
52-
49+ /**
50+ * Set the message token.
51+ */
5352 public function token (?string $ token ): self
5453 {
5554 $ this ->token = $ token ;
@@ -58,7 +57,7 @@ public function token(?string $token): self
5857 }
5958
6059 /**
61- * Set the message topic.s
60+ * Set the message topic.
6261 */
6362 public function topic (?string $ topic ): self
6463 {
@@ -67,14 +66,19 @@ public function topic(?string $topic): self
6766 return $ this ;
6867 }
6968
70-
69+ /**
70+ * Set the message condition.
71+ */
7172 public function condition (?string $ condition ): self
7273 {
7374 $ this ->condition = $ condition ;
7475
7576 return $ this ;
7677 }
7778
79+ /**
80+ * Set the message data.
81+ */
7882 public function data (?array $ data ): self
7983 {
8084 if (! empty (array_filter ($ data , fn ($ value ) => ! is_string ($ value )))) {
@@ -86,21 +90,21 @@ public function data(?array $data): self
8690 return $ this ;
8791 }
8892
89-
93+ /**
94+ * Set the message custom options.
95+ */
9096 public function custom (?array $ custom = []): self
9197 {
9298 $ this ->custom = $ custom ;
9399
94100 return $ this ;
95101 }
96102
97-
98103 /**
99- * Set "android" specific custom options.
104+ * Set Aandroid specific custom options.
100105 */
101106 public function android (array $ options = []): self
102107 {
103-
104108 $ this ->custom ([
105109 ...$ this ->custom ,
106110 'android ' => $ options ,
@@ -109,11 +113,8 @@ public function android(array $options = []): self
109113 return $ this ;
110114 }
111115
112-
113-
114116 /**
115- * Set APNs-specific custom options for iOS.
116- * Set APNs-specific custom options for iOS.
117+ * Set APNs-specific custom options.
117118 */
118119 public function ios (array $ options = []): self
119120 {
@@ -126,22 +127,29 @@ public function ios(array $options = []): self
126127 return $ this ;
127128 }
128129
129-
130+ /**
131+ * Set the message notification.
132+ */
130133 public function notification (Notification $ notification ): self
131134 {
132135 $ this ->notification = $ notification ;
133136
134137 return $ this ;
135138 }
136139
140+ /**
141+ * Set the client to use for the message.
142+ */
137143 public function usingClient (Messaging $ client ): self
138144 {
139145 $ this ->client = $ client ;
140146
141147 return $ this ;
142148 }
143149
144-
150+ /**
151+ * Get the array represenation of the message.
152+ */
145153 public function toArray ()
146154 {
147155 return array_filter ([
@@ -155,7 +163,6 @@ public function toArray()
155163 ]);
156164 }
157165
158-
159166 /**
160167 * @return mixed
161168 */
0 commit comments