@@ -51,9 +51,8 @@ public function __construct()
5151
5252 /**
5353 * Sets the sender of the message. Email or format "John Doe" <doe@example.com>
54- * @return static
5554 */
56- public function setFrom (string $ email , string $ name = null )
55+ public function setFrom (string $ email , string $ name = null ): static
5756 {
5857 $ this ->setHeader ('From ' , $ this ->formatEmail ($ email , $ name ));
5958 return $ this ;
@@ -71,9 +70,8 @@ public function getFrom(): ?array
7170
7271 /**
7372 * Adds the reply-to address. Email or format "John Doe" <doe@example.com>
74- * @return static
7573 */
76- public function addReplyTo (string $ email , string $ name = null )
74+ public function addReplyTo (string $ email , string $ name = null ): static
7775 {
7876 $ this ->setHeader ('Reply-To ' , $ this ->formatEmail ($ email , $ name ), true );
7977 return $ this ;
@@ -82,9 +80,8 @@ public function addReplyTo(string $email, string $name = null)
8280
8381 /**
8482 * Sets the subject of the message.
85- * @return static
8683 */
87- public function setSubject (string $ subject )
84+ public function setSubject (string $ subject ): static
8885 {
8986 $ this ->setHeader ('Subject ' , $ subject );
9087 return $ this ;
@@ -102,9 +99,8 @@ public function getSubject(): ?string
10299
103100 /**
104101 * Adds email recipient. Email or format "John Doe" <doe@example.com>
105- * @return static
106102 */
107- public function addTo (string $ email , string $ name = null ) // addRecipient()
103+ public function addTo (string $ email , string $ name = null ): static // addRecipient()
108104 {
109105 $ this ->setHeader ('To ' , $ this ->formatEmail ($ email , $ name ), true );
110106 return $ this ;
@@ -113,9 +109,8 @@ public function addTo(string $email, string $name = null) // addRecipient()
113109
114110 /**
115111 * Adds carbon copy email recipient. Email or format "John Doe" <doe@example.com>
116- * @return static
117112 */
118- public function addCc (string $ email , string $ name = null )
113+ public function addCc (string $ email , string $ name = null ): static
119114 {
120115 $ this ->setHeader ('Cc ' , $ this ->formatEmail ($ email , $ name ), true );
121116 return $ this ;
@@ -124,9 +119,8 @@ public function addCc(string $email, string $name = null)
124119
125120 /**
126121 * Adds blind carbon copy email recipient. Email or format "John Doe" <doe@example.com>
127- * @return static
128122 */
129- public function addBcc (string $ email , string $ name = null )
123+ public function addBcc (string $ email , string $ name = null ): static
130124 {
131125 $ this ->setHeader ('Bcc ' , $ this ->formatEmail ($ email , $ name ), true );
132126 return $ this ;
@@ -153,9 +147,8 @@ private function formatEmail(string $email, string $name = null): array
153147
154148 /**
155149 * Sets the Return-Path header of the message.
156- * @return static
157150 */
158- public function setReturnPath (string $ email )
151+ public function setReturnPath (string $ email ): static
159152 {
160153 $ this ->setHeader ('Return-Path ' , $ email );
161154 return $ this ;
@@ -173,9 +166,8 @@ public function getReturnPath(): ?string
173166
174167 /**
175168 * Sets email priority.
176- * @return static
177169 */
178- public function setPriority (int $ priority )
170+ public function setPriority (int $ priority ): static
179171 {
180172 $ this ->setHeader ('X-Priority ' , (string ) $ priority );
181173 return $ this ;
@@ -194,9 +186,8 @@ public function getPriority(): ?int
194186
195187 /**
196188 * Sets HTML body.
197- * @return static
198189 */
199- public function setHtmlBody (string $ html , string $ basePath = null )
190+ public function setHtmlBody (string $ html , string $ basePath = null ): static
200191 {
201192 if ($ basePath ) {
202193 $ cids = [];
@@ -264,9 +255,8 @@ public function addEmbeddedFile(string $file, string $content = null, string $co
264255
265256 /**
266257 * Adds inlined Mime Part.
267- * @return static
268258 */
269- public function addInlinePart (MimePart $ part )
259+ public function addInlinePart (MimePart $ part ): static
270260 {
271261 $ this ->inlines [] = $ part ;
272262 return $ this ;
@@ -339,9 +329,8 @@ public function generateMessage(): string
339329
340330 /**
341331 * Builds email. Does not modify itself, but returns a new object.
342- * @return static
343332 */
344- public function build ()
333+ public function build (): static
345334 {
346335 $ mail = clone $ this ;
347336 $ mail ->setHeader ('Message-ID ' , $ mail ->getHeader ('Message-ID ' ) ?? $ this ->getRandomId ());
0 commit comments