@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | if (!isset($msg['to'])) { |
| 73 | 73 | throw new \Exception('收件人未设置'); |
| 74 | - }else{ |
|
| 74 | + } else{ |
|
| 75 | 75 | $msg['to'] = $this->checkEmailAddress($msg['to']); |
| 76 | 76 | } |
| 77 | 77 | if (isset($msg['cc'])){ |
@@ -93,15 +93,15 @@ discard block |
||
| 93 | 93 | return [ |
| 94 | 94 | ['email'=>$emailAddresses,'name'=>$emailAddresses] |
| 95 | 95 | ]; |
| 96 | - }else{ |
|
| 96 | + } else{ |
|
| 97 | 97 | throw new \Exception("邮箱格式不正确:".$emailAddresses); |
| 98 | 98 | } |
| 99 | - }elseif (is_array($emailAddresses)){ |
|
| 99 | + } elseif (is_array($emailAddresses)){ |
|
| 100 | 100 | foreach ($emailAddresses as &$emailAddress) { |
| 101 | 101 | if (is_string($emailAddress)){ |
| 102 | 102 | $emailAddress = ['email'=>$emailAddress,'name'=>$emailAddress]; |
| 103 | 103 | |
| 104 | - }else{ |
|
| 104 | + } else{ |
|
| 105 | 105 | if (!isset($emailAddress['email'])){ |
| 106 | 106 | throw new Exception("缺失邮箱地址[email]"); |
| 107 | 107 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | throw new \Exception('附件不存在:'.$attachment); |
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | - }else{ |
|
| 143 | + } else{ |
|
| 144 | 144 | throw new \Exception("attachments参数格式错误"); |
| 145 | 145 | } |
| 146 | 146 | return $attachments; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $res = Http::get($url); |
| 23 | 23 | if (isset($res['access_token'])){ |
| 24 | 24 | return $res; |
| 25 | - }else{ |
|
| 25 | + } else{ |
|
| 26 | 26 | return $res; |
| 27 | 27 | } |
| 28 | 28 | |