@@ -153,7 +153,7 @@ protected function getCharset() : string
153153 *
154154 * @return static
155155 */
156- public function setBoundary (string $ boundary = null ) : static
156+ public function setBoundary (? string $ boundary = null ) : static
157157 {
158158 $ this ->boundary = $ boundary ?? \bin2hex (\random_bytes (16 ));
159159 return $ this ;
@@ -470,7 +470,7 @@ public function getSubject() : ?string
470470 *
471471 * @return static
472472 */
473- public function addTo (string $ address , string $ name = null ) : static
473+ public function addTo (string $ address , ? string $ name = null ) : static
474474 {
475475 $ this ->to [$ address ] = $ name ;
476476 $ this ->setHeader (Header::TO , static ::formatAddressList ($ this ->to ));
@@ -506,7 +506,7 @@ public function removeTo() : static
506506 *
507507 * @return static
508508 */
509- public function addCc (string $ address , string $ name = null ) : static
509+ public function addCc (string $ address , ? string $ name = null ) : static
510510 {
511511 $ this ->cc [$ address ] = $ name ;
512512 $ this ->setHeader (Header::CC , static ::formatAddressList ($ this ->cc ));
@@ -551,7 +551,7 @@ public function getRecipients() : array
551551 *
552552 * @return static
553553 */
554- public function addBcc (string $ address , string $ name = null ) : static
554+ public function addBcc (string $ address , ? string $ name = null ) : static
555555 {
556556 $ this ->bcc [$ address ] = $ name ;
557557 $ this ->setHeader (Header::BCC , static ::formatAddressList ($ this ->bcc ));
@@ -587,7 +587,7 @@ public function removeBcc() : static
587587 *
588588 * @return static
589589 */
590- public function addReplyTo (string $ address , string $ name = null ) : static
590+ public function addReplyTo (string $ address , ? string $ name = null ) : static
591591 {
592592 $ this ->replyTo [$ address ] = $ name ;
593593 $ this ->setHeader (Header::REPLY_TO , static ::formatAddressList ($ this ->replyTo ));
@@ -623,7 +623,7 @@ public function removeReplyTo() : static
623623 *
624624 * @return static
625625 */
626- public function setFrom (string $ address , string $ name = null ) : static
626+ public function setFrom (string $ address , ? string $ name = null ) : static
627627 {
628628 $ this ->from = [$ address , $ name ];
629629 $ this ->setHeader (Header::FROM , static ::formatAddress ($ address , $ name ));
@@ -679,7 +679,7 @@ public function removeFrom() : static
679679 *
680680 * @return static
681681 */
682- public function setDate (DateTime $ datetime = null ) : static
682+ public function setDate (? DateTime $ datetime = null ) : static
683683 {
684684 $ date = $ datetime ? $ datetime ->format ('r ' ) : \date ('r ' );
685685 $ this ->setHeader (Header::DATE , $ date );
@@ -730,7 +730,7 @@ public function getXPriority() : ?XPriority
730730 *
731731 * @return static
732732 */
733- public function setXMailer (string $ xMailer = null ) : static
733+ public function setXMailer (? string $ xMailer = null ) : static
734734 {
735735 $ xMailer ??= 'Aplus Mailer ' ;
736736 $ this ->setHeader (Header::X_MAILER , $ xMailer );
@@ -747,7 +747,7 @@ public function getXMailer() : ?string
747747 return $ this ->getHeader (Header::X_MAILER );
748748 }
749749
750- protected static function formatAddress (string $ address , string $ name = null ) : string
750+ protected static function formatAddress (string $ address , ? string $ name = null ) : string
751751 {
752752 return $ name !== null ? '" ' . $ name . '" < ' . $ address . '> ' : $ address ;
753753 }
0 commit comments