@@ -49,9 +49,8 @@ public function __construct()
4949
5050 /**
5151 * Sets the sender of the message. Email or format "John Doe" <[email protected] > 52- * @return static
5352 */
54- public function setFrom (string $ email , ?string $ name = null )
53+ public function setFrom (string $ email , ?string $ name = null ): static
5554 {
5655 $ this ->setHeader ('From ' , $ this ->formatEmail ($ email , $ name ));
5756 return $ this ;
@@ -69,9 +68,8 @@ public function getFrom(): ?array
6968
7069 /**
7170 * Adds the reply-to address. Email or format "John Doe" <[email protected] > 72- * @return static
7371 */
74- public function addReplyTo (string $ email , ?string $ name = null )
72+ public function addReplyTo (string $ email , ?string $ name = null ): static
7573 {
7674 $ this ->setHeader ('Reply-To ' , $ this ->formatEmail ($ email , $ name ), true );
7775 return $ this ;
@@ -80,9 +78,8 @@ public function addReplyTo(string $email, ?string $name = null)
8078
8179 /**
8280 * Sets the subject of the message.
83- * @return static
8481 */
85- public function setSubject (string $ subject )
82+ public function setSubject (string $ subject ): static
8683 {
8784 $ this ->setHeader ('Subject ' , $ subject );
8885 return $ this ;
@@ -100,9 +97,8 @@ public function getSubject(): ?string
10097
10198 /**
10299 * Adds email recipient. Email or format "John Doe" <[email protected] > 103- * @return static
104100 */
105- public function addTo (string $ email , ?string $ name = null ) // addRecipient()
101+ public function addTo (string $ email , ?string $ name = null ): static // addRecipient()
106102 {
107103 $ this ->setHeader ('To ' , $ this ->formatEmail ($ email , $ name ), true );
108104 return $ this ;
@@ -111,9 +107,8 @@ public function addTo(string $email, ?string $name = null) // addRecipient()
111107
112108 /**
113109 * Adds carbon copy email recipient. Email or format "John Doe" <[email protected] > 114- * @return static
115110 */
116- public function addCc (string $ email , ?string $ name = null )
111+ public function addCc (string $ email , ?string $ name = null ): static
117112 {
118113 $ this ->setHeader ('Cc ' , $ this ->formatEmail ($ email , $ name ), true );
119114 return $ this ;
@@ -122,9 +117,8 @@ public function addCc(string $email, ?string $name = null)
122117
123118 /**
124119 * Adds blind carbon copy email recipient. Email or format "John Doe" <[email protected] > 125- * @return static
126120 */
127- public function addBcc (string $ email , ?string $ name = null )
121+ public function addBcc (string $ email , ?string $ name = null ): static
128122 {
129123 $ this ->setHeader ('Bcc ' , $ this ->formatEmail ($ email , $ name ), true );
130124 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 ;
@@ -192,9 +184,8 @@ public function getPriority(): ?int
192184
193185 /**
194186 * Sets HTML body.
195- * @return static
196187 */
197- public function setHtmlBody (string $ html , ?string $ basePath = null )
188+ public function setHtmlBody (string $ html , ?string $ basePath = null ): static
198189 {
199190 if ($ basePath ) {
200191 $ cids = [];
@@ -262,9 +253,8 @@ public function addEmbeddedFile(string $file, ?string $content = null, ?string $
262253
263254 /**
264255 * Adds inlined Mime Part.
265- * @return static
266256 */
267- public function addInlinePart (MimePart $ part )
257+ public function addInlinePart (MimePart $ part ): static
268258 {
269259 $ this ->inlines [] = $ part ;
270260 return $ this ;
@@ -338,9 +328,8 @@ public function generateMessage(): string
338328
339329 /**
340330 * Builds email. Does not modify itself, but returns a new object.
341- * @return static
342331 */
343- public function build ()
332+ public function build (): static
344333 {
345334 $ mail = clone $ this ;
346335 $ mail ->setHeader ('Message-ID ' , $ mail ->getHeader ('Message-ID ' ) ?? $ this ->getRandomId ());
0 commit comments