Completed
Push — develop ( c337fc...4b8a8e )
by Paul
02:01
created
src/Email.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@  discard block
 block discarded – undo
62 62
 		$this->to          = $email['to'];
63 63
 
64 64
 		add_action( 'phpmailer_init', function( PHPMailer $phpmailer ) {
65
-			if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody ))return;
65
+			if( $phpmailer->ContentType === 'text/plain' || !empty( $phpmailer->AltBody )) {
66
+				return;
67
+			}
66 68
 			$phpmailer->AltBody = $this->buildPlainTextMessage( $phpmailer->Body );
67 69
 		});
68 70
 
@@ -86,7 +88,9 @@  discard block
 block discarded – undo
86 88
 	 */
87 89
 	public function send()
88 90
 	{
89
-		if( !$this->message || !$this->subject || !$this->to )return;
91
+		if( !$this->message || !$this->subject || !$this->to ) {
92
+			return;
93
+		}
90 94
 
91 95
 		$sent = wp_mail(
92 96
 			$this->to,
@@ -226,7 +230,9 @@  discard block
 block discarded – undo
226 230
 		if( !file_exists( $file )) {
227 231
 			$file = sprintf( '%s/templates/%s.php', dirname( __DIR__ ), $templatePath );
228 232
 		}
229
-		if( !file_exists( $file ))return;
233
+		if( !file_exists( $file )) {
234
+			return;
235
+		}
230 236
 
231 237
 		ob_start();
232 238
 		include $file;
Please login to merge, or discard this patch.