@@ -153,7 +153,7 @@ protected function getCharset() : string
153
153
*
154
154
* @return static
155
155
*/
156
- public function setBoundary (string $ boundary = null ) : static
156
+ public function setBoundary (? string $ boundary = null ) : static
157
157
{
158
158
$ this ->boundary = $ boundary ?? \bin2hex (\random_bytes (16 ));
159
159
return $ this ;
@@ -470,7 +470,7 @@ public function getSubject() : ?string
470
470
*
471
471
* @return static
472
472
*/
473
- public function addTo (string $ address , string $ name = null ) : static
473
+ public function addTo (string $ address , ? string $ name = null ) : static
474
474
{
475
475
$ this ->to [$ address ] = $ name ;
476
476
$ this ->setHeader (Header::TO , static ::formatAddressList ($ this ->to ));
@@ -506,7 +506,7 @@ public function removeTo() : static
506
506
*
507
507
* @return static
508
508
*/
509
- public function addCc (string $ address , string $ name = null ) : static
509
+ public function addCc (string $ address , ? string $ name = null ) : static
510
510
{
511
511
$ this ->cc [$ address ] = $ name ;
512
512
$ this ->setHeader (Header::CC , static ::formatAddressList ($ this ->cc ));
@@ -551,7 +551,7 @@ public function getRecipients() : array
551
551
*
552
552
* @return static
553
553
*/
554
- public function addBcc (string $ address , string $ name = null ) : static
554
+ public function addBcc (string $ address , ? string $ name = null ) : static
555
555
{
556
556
$ this ->bcc [$ address ] = $ name ;
557
557
$ this ->setHeader (Header::BCC , static ::formatAddressList ($ this ->bcc ));
@@ -587,7 +587,7 @@ public function removeBcc() : static
587
587
*
588
588
* @return static
589
589
*/
590
- public function addReplyTo (string $ address , string $ name = null ) : static
590
+ public function addReplyTo (string $ address , ? string $ name = null ) : static
591
591
{
592
592
$ this ->replyTo [$ address ] = $ name ;
593
593
$ this ->setHeader (Header::REPLY_TO , static ::formatAddressList ($ this ->replyTo ));
@@ -623,7 +623,7 @@ public function removeReplyTo() : static
623
623
*
624
624
* @return static
625
625
*/
626
- public function setFrom (string $ address , string $ name = null ) : static
626
+ public function setFrom (string $ address , ? string $ name = null ) : static
627
627
{
628
628
$ this ->from = [$ address , $ name ];
629
629
$ this ->setHeader (Header::FROM , static ::formatAddress ($ address , $ name ));
@@ -679,7 +679,7 @@ public function removeFrom() : static
679
679
*
680
680
* @return static
681
681
*/
682
- public function setDate (DateTime $ datetime = null ) : static
682
+ public function setDate (? DateTime $ datetime = null ) : static
683
683
{
684
684
$ date = $ datetime ? $ datetime ->format ('r ' ) : \date ('r ' );
685
685
$ this ->setHeader (Header::DATE , $ date );
@@ -730,7 +730,7 @@ public function getXPriority() : ?XPriority
730
730
*
731
731
* @return static
732
732
*/
733
- public function setXMailer (string $ xMailer = null ) : static
733
+ public function setXMailer (? string $ xMailer = null ) : static
734
734
{
735
735
$ xMailer ??= 'Aplus Mailer ' ;
736
736
$ this ->setHeader (Header::X_MAILER , $ xMailer );
@@ -747,7 +747,7 @@ public function getXMailer() : ?string
747
747
return $ this ->getHeader (Header::X_MAILER );
748
748
}
749
749
750
- protected static function formatAddress (string $ address , string $ name = null ) : string
750
+ protected static function formatAddress (string $ address , ? string $ name = null ) : string
751
751
{
752
752
return $ name !== null ? '" ' . $ name . '" < ' . $ address . '> ' : $ address ;
753
753
}
0 commit comments