@@ -50,9 +50,8 @@ public function __construct()
50
50
51
51
/**
52
52
* Sets the sender of the message. Email or format "John Doe" <[email protected] >
53
- * @return static
54
53
*/
55
- public function setFrom (string $ email , string $ name = null )
54
+ public function setFrom (string $ email , string $ name = null ): static
56
55
{
57
56
$ this ->setHeader ('From ' , $ this ->formatEmail ($ email , $ name ));
58
57
return $ this ;
@@ -70,9 +69,8 @@ public function getFrom(): ?array
70
69
71
70
/**
72
71
* Adds the reply-to address. Email or format "John Doe" <[email protected] >
73
- * @return static
74
72
*/
75
- public function addReplyTo (string $ email , string $ name = null )
73
+ public function addReplyTo (string $ email , string $ name = null ): static
76
74
{
77
75
$ this ->setHeader ('Reply-To ' , $ this ->formatEmail ($ email , $ name ), true );
78
76
return $ this ;
@@ -81,9 +79,8 @@ public function addReplyTo(string $email, string $name = null)
81
79
82
80
/**
83
81
* Sets the subject of the message.
84
- * @return static
85
82
*/
86
- public function setSubject (string $ subject )
83
+ public function setSubject (string $ subject ): static
87
84
{
88
85
$ this ->setHeader ('Subject ' , $ subject );
89
86
return $ this ;
@@ -101,9 +98,8 @@ public function getSubject(): ?string
101
98
102
99
/**
103
100
* Adds email recipient. Email or format "John Doe" <[email protected] >
104
- * @return static
105
101
*/
106
- public function addTo (string $ email , string $ name = null ) // addRecipient()
102
+ public function addTo (string $ email , string $ name = null ): static // addRecipient()
107
103
{
108
104
$ this ->setHeader ('To ' , $ this ->formatEmail ($ email , $ name ), true );
109
105
return $ this ;
@@ -112,9 +108,8 @@ public function addTo(string $email, string $name = null) // addRecipient()
112
108
113
109
/**
114
110
* Adds carbon copy email recipient. Email or format "John Doe" <[email protected] >
115
- * @return static
116
111
*/
117
- public function addCc (string $ email , string $ name = null )
112
+ public function addCc (string $ email , string $ name = null ): static
118
113
{
119
114
$ this ->setHeader ('Cc ' , $ this ->formatEmail ($ email , $ name ), true );
120
115
return $ this ;
@@ -123,9 +118,8 @@ public function addCc(string $email, string $name = null)
123
118
124
119
/**
125
120
* Adds blind carbon copy email recipient. Email or format "John Doe" <[email protected] >
126
- * @return static
127
121
*/
128
- public function addBcc (string $ email , string $ name = null )
122
+ public function addBcc (string $ email , string $ name = null ): static
129
123
{
130
124
$ this ->setHeader ('Bcc ' , $ this ->formatEmail ($ email , $ name ), true );
131
125
return $ this ;
@@ -151,9 +145,8 @@ private function formatEmail(string $email, string $name = null): array
151
145
152
146
/**
153
147
* Sets the Return-Path header of the message.
154
- * @return static
155
148
*/
156
- public function setReturnPath (string $ email )
149
+ public function setReturnPath (string $ email ): static
157
150
{
158
151
$ this ->setHeader ('Return-Path ' , $ email );
159
152
return $ this ;
@@ -171,9 +164,8 @@ public function getReturnPath(): ?string
171
164
172
165
/**
173
166
* Sets email priority.
174
- * @return static
175
167
*/
176
- public function setPriority (int $ priority )
168
+ public function setPriority (int $ priority ): static
177
169
{
178
170
$ this ->setHeader ('X-Priority ' , (string ) $ priority );
179
171
return $ this ;
@@ -192,9 +184,8 @@ public function getPriority(): ?int
192
184
193
185
/**
194
186
* Sets HTML body.
195
- * @return static
196
187
*/
197
- public function setHtmlBody (string $ html , string $ basePath = null )
188
+ public function setHtmlBody (string $ html , string $ basePath = null ): static
198
189
{
199
190
if ($ basePath ) {
200
191
$ cids = [];
@@ -261,9 +252,8 @@ public function addEmbeddedFile(string $file, string $content = null, string $co
261
252
262
253
/**
263
254
* Adds inlined Mime Part.
264
- * @return static
265
255
*/
266
- public function addInlinePart (MimePart $ part )
256
+ public function addInlinePart (MimePart $ part ): static
267
257
{
268
258
$ this ->inlines [] = $ part ;
269
259
return $ this ;
@@ -334,9 +324,8 @@ public function generateMessage(): string
334
324
335
325
/**
336
326
* Builds email. Does not modify itself, but returns a new object.
337
- * @return static
338
327
*/
339
- public function build ()
328
+ public function build (): static
340
329
{
341
330
$ mail = clone $ this ;
342
331
$ mail ->setHeader ('Message-ID ' , $ mail ->getHeader ('Message-ID ' ) ?? $ this ->getRandomId ());
0 commit comments