@@ -47,7 +47,7 @@ class Email extends Message
47
47
/**
48
48
* @return $this
49
49
*/
50
- public function subject (string $ subject )
50
+ public function subject (string $ subject ): static
51
51
{
52
52
return $ this ->setHeaderBody ('Text ' , 'Subject ' , $ subject );
53
53
}
@@ -60,7 +60,7 @@ public function getSubject(): ?string
60
60
/**
61
61
* @return $this
62
62
*/
63
- public function date (\DateTimeInterface $ dateTime )
63
+ public function date (\DateTimeInterface $ dateTime ): static
64
64
{
65
65
return $ this ->setHeaderBody ('Date ' , 'Date ' , $ dateTime );
66
66
}
@@ -73,7 +73,7 @@ public function getDate(): ?\DateTimeImmutable
73
73
/**
74
74
* @return $this
75
75
*/
76
- public function returnPath (Address |string $ address )
76
+ public function returnPath (Address |string $ address ): static
77
77
{
78
78
return $ this ->setHeaderBody ('Path ' , 'Return-Path ' , Address::create ($ address ));
79
79
}
@@ -86,7 +86,7 @@ public function getReturnPath(): ?Address
86
86
/**
87
87
* @return $this
88
88
*/
89
- public function sender (Address |string $ address )
89
+ public function sender (Address |string $ address ): static
90
90
{
91
91
return $ this ->setHeaderBody ('Mailbox ' , 'Sender ' , Address::create ($ address ));
92
92
}
@@ -99,15 +99,15 @@ public function getSender(): ?Address
99
99
/**
100
100
* @return $this
101
101
*/
102
- public function addFrom (Address |string ...$ addresses )
102
+ public function addFrom (Address |string ...$ addresses ): static
103
103
{
104
104
return $ this ->addListAddressHeaderBody ('From ' , $ addresses );
105
105
}
106
106
107
107
/**
108
108
* @return $this
109
109
*/
110
- public function from (Address |string ...$ addresses )
110
+ public function from (Address |string ...$ addresses ): static
111
111
{
112
112
return $ this ->setListAddressHeaderBody ('From ' , $ addresses );
113
113
}
@@ -123,15 +123,15 @@ public function getFrom(): array
123
123
/**
124
124
* @return $this
125
125
*/
126
- public function addReplyTo (Address |string ...$ addresses )
126
+ public function addReplyTo (Address |string ...$ addresses ): static
127
127
{
128
128
return $ this ->addListAddressHeaderBody ('Reply-To ' , $ addresses );
129
129
}
130
130
131
131
/**
132
132
* @return $this
133
133
*/
134
- public function replyTo (Address |string ...$ addresses )
134
+ public function replyTo (Address |string ...$ addresses ): static
135
135
{
136
136
return $ this ->setListAddressHeaderBody ('Reply-To ' , $ addresses );
137
137
}
@@ -147,15 +147,15 @@ public function getReplyTo(): array
147
147
/**
148
148
* @return $this
149
149
*/
150
- public function addTo (Address |string ...$ addresses )
150
+ public function addTo (Address |string ...$ addresses ): static
151
151
{
152
152
return $ this ->addListAddressHeaderBody ('To ' , $ addresses );
153
153
}
154
154
155
155
/**
156
156
* @return $this
157
157
*/
158
- public function to (Address |string ...$ addresses )
158
+ public function to (Address |string ...$ addresses ): static
159
159
{
160
160
return $ this ->setListAddressHeaderBody ('To ' , $ addresses );
161
161
}
@@ -171,15 +171,15 @@ public function getTo(): array
171
171
/**
172
172
* @return $this
173
173
*/
174
- public function addCc (Address |string ...$ addresses )
174
+ public function addCc (Address |string ...$ addresses ): static
175
175
{
176
176
return $ this ->addListAddressHeaderBody ('Cc ' , $ addresses );
177
177
}
178
178
179
179
/**
180
180
* @return $this
181
181
*/
182
- public function cc (Address |string ...$ addresses )
182
+ public function cc (Address |string ...$ addresses ): static
183
183
{
184
184
return $ this ->setListAddressHeaderBody ('Cc ' , $ addresses );
185
185
}
@@ -195,15 +195,15 @@ public function getCc(): array
195
195
/**
196
196
* @return $this
197
197
*/
198
- public function addBcc (Address |string ...$ addresses )
198
+ public function addBcc (Address |string ...$ addresses ): static
199
199
{
200
200
return $ this ->addListAddressHeaderBody ('Bcc ' , $ addresses );
201
201
}
202
202
203
203
/**
204
204
* @return $this
205
205
*/
206
- public function bcc (Address |string ...$ addresses )
206
+ public function bcc (Address |string ...$ addresses ): static
207
207
{
208
208
return $ this ->setListAddressHeaderBody ('Bcc ' , $ addresses );
209
209
}
@@ -223,7 +223,7 @@ public function getBcc(): array
223
223
*
224
224
* @return $this
225
225
*/
226
- public function priority (int $ priority )
226
+ public function priority (int $ priority ): static
227
227
{
228
228
if ($ priority > 5 ) {
229
229
$ priority = 5 ;
@@ -252,7 +252,7 @@ public function getPriority(): int
252
252
*
253
253
* @return $this
254
254
*/
255
- public function text ($ body , string $ charset = 'utf-8 ' )
255
+ public function text ($ body , string $ charset = 'utf-8 ' ): static
256
256
{
257
257
$ this ->text = $ body ;
258
258
$ this ->textCharset = $ charset ;
@@ -278,7 +278,7 @@ public function getTextCharset(): ?string
278
278
*
279
279
* @return $this
280
280
*/
281
- public function html ($ body , string $ charset = 'utf-8 ' )
281
+ public function html ($ body , string $ charset = 'utf-8 ' ): static
282
282
{
283
283
$ this ->html = $ body ;
284
284
$ this ->htmlCharset = $ charset ;
@@ -304,7 +304,7 @@ public function getHtmlCharset(): ?string
304
304
*
305
305
* @return $this
306
306
*/
307
- public function attach ($ body , string $ name = null , string $ contentType = null )
307
+ public function attach ($ body , string $ name = null , string $ contentType = null ): static
308
308
{
309
309
$ this ->attachments [] = ['body ' => $ body , 'name ' => $ name , 'content-type ' => $ contentType , 'inline ' => false ];
310
310
@@ -314,7 +314,7 @@ public function attach($body, string $name = null, string $contentType = null)
314
314
/**
315
315
* @return $this
316
316
*/
317
- public function attachFromPath (string $ path , string $ name = null , string $ contentType = null )
317
+ public function attachFromPath (string $ path , string $ name = null , string $ contentType = null ): static
318
318
{
319
319
$ this ->attachments [] = ['path ' => $ path , 'name ' => $ name , 'content-type ' => $ contentType , 'inline ' => false ];
320
320
@@ -326,7 +326,7 @@ public function attachFromPath(string $path, string $name = null, string $conten
326
326
*
327
327
* @return $this
328
328
*/
329
- public function embed ($ body , string $ name = null , string $ contentType = null )
329
+ public function embed ($ body , string $ name = null , string $ contentType = null ): static
330
330
{
331
331
$ this ->attachments [] = ['body ' => $ body , 'name ' => $ name , 'content-type ' => $ contentType , 'inline ' => true ];
332
332
@@ -336,7 +336,7 @@ public function embed($body, string $name = null, string $contentType = null)
336
336
/**
337
337
* @return $this
338
338
*/
339
- public function embedFromPath (string $ path , string $ name = null , string $ contentType = null )
339
+ public function embedFromPath (string $ path , string $ name = null , string $ contentType = null ): static
340
340
{
341
341
$ this ->attachments [] = ['path ' => $ path , 'name ' => $ name , 'content-type ' => $ contentType , 'inline ' => true ];
342
342
@@ -346,7 +346,7 @@ public function embedFromPath(string $path, string $name = null, string $content
346
346
/**
347
347
* @return $this
348
348
*/
349
- public function attachPart (DataPart $ part )
349
+ public function attachPart (DataPart $ part ): static
350
350
{
351
351
$ this ->attachments [] = ['part ' => $ part ];
352
352
0 commit comments