@@ -50,9 +50,8 @@ public function __construct()
5050
5151 /**
5252 * Sets the sender of the message. Email or format "John Doe" <doe@example.com>
53- * @return static
5453 */
55- public function setFrom (string $ email , string $ name = null )
54+ public function setFrom (string $ email , string $ name = null ): static
5655 {
5756 $ this ->setHeader ('From ' , $ this ->formatEmail ($ email , $ name ));
5857 return $ this ;
@@ -70,9 +69,8 @@ public function getFrom(): ?array
7069
7170 /**
7271 * Adds the reply-to address. Email or format "John Doe" <doe@example.com>
73- * @return static
7472 */
75- public function addReplyTo (string $ email , string $ name = null )
73+ public function addReplyTo (string $ email , string $ name = null ): static
7674 {
7775 $ this ->setHeader ('Reply-To ' , $ this ->formatEmail ($ email , $ name ), true );
7876 return $ this ;
@@ -81,9 +79,8 @@ public function addReplyTo(string $email, string $name = null)
8179
8280 /**
8381 * Sets the subject of the message.
84- * @return static
8582 */
86- public function setSubject (string $ subject )
83+ public function setSubject (string $ subject ): static
8784 {
8885 $ this ->setHeader ('Subject ' , $ subject );
8986 return $ this ;
@@ -101,9 +98,8 @@ public function getSubject(): ?string
10198
10299 /**
103100 * Adds email recipient. Email or format "John Doe" <doe@example.com>
104- * @return static
105101 */
106- public function addTo (string $ email , string $ name = null ) // addRecipient()
102+ public function addTo (string $ email , string $ name = null ): static // addRecipient()
107103 {
108104 $ this ->setHeader ('To ' , $ this ->formatEmail ($ email , $ name ), true );
109105 return $ this ;
@@ -112,9 +108,8 @@ public function addTo(string $email, string $name = null) // addRecipient()
112108
113109 /**
114110 * Adds carbon copy email recipient. Email or format "John Doe" <doe@example.com>
115- * @return static
116111 */
117- public function addCc (string $ email , string $ name = null )
112+ public function addCc (string $ email , string $ name = null ): static
118113 {
119114 $ this ->setHeader ('Cc ' , $ this ->formatEmail ($ email , $ name ), true );
120115 return $ this ;
@@ -123,9 +118,8 @@ public function addCc(string $email, string $name = null)
123118
124119 /**
125120 * Adds blind carbon copy email recipient. Email or format "John Doe" <doe@example.com>
126- * @return static
127121 */
128- public function addBcc (string $ email , string $ name = null )
122+ public function addBcc (string $ email , string $ name = null ): static
129123 {
130124 $ this ->setHeader ('Bcc ' , $ this ->formatEmail ($ email , $ name ), true );
131125 return $ this ;
@@ -151,9 +145,8 @@ private function formatEmail(string $email, string $name = null): array
151145
152146 /**
153147 * Sets the Return-Path header of the message.
154- * @return static
155148 */
156- public function setReturnPath (string $ email )
149+ public function setReturnPath (string $ email ): static
157150 {
158151 $ this ->setHeader ('Return-Path ' , $ email );
159152 return $ this ;
@@ -171,9 +164,8 @@ public function getReturnPath(): ?string
171164
172165 /**
173166 * Sets email priority.
174- * @return static
175167 */
176- public function setPriority (int $ priority )
168+ public function setPriority (int $ priority ): static
177169 {
178170 $ this ->setHeader ('X-Priority ' , (string ) $ priority );
179171 return $ this ;
@@ -191,9 +183,8 @@ public function getPriority(): ?int
191183
192184 /**
193185 * Sets HTML body.
194- * @return static
195186 */
196- public function setHtmlBody (string $ html , string $ basePath = null )
187+ public function setHtmlBody (string $ html , string $ basePath = null ): static
197188 {
198189 if ($ basePath ) {
199190 $ cids = [];
@@ -260,9 +251,8 @@ public function addEmbeddedFile(string $file, string $content = null, string $co
260251
261252 /**
262253 * Adds inlined Mime Part.
263- * @return static
264254 */
265- public function addInlinePart (MimePart $ part )
255+ public function addInlinePart (MimePart $ part ): static
266256 {
267257 $ this ->inlines [] = $ part ;
268258 return $ this ;
@@ -333,9 +323,8 @@ public function generateMessage(): string
333323
334324 /**
335325 * Builds email. Does not modify itself, but returns a new object.
336- * @return static
337326 */
338- public function build ()
327+ public function build (): static
339328 {
340329 $ mail = clone $ this ;
341330 $ mail ->setHeader ('Message-ID ' , $ mail ->getHeader ('Message-ID ' ) ?? $ this ->getRandomId ());
0 commit comments