@@ -304,14 +304,12 @@ discard block |
||
304 | 304 | if( class_exists( $class ) && $this->object instanceof $class ) |
305 | 305 | { |
306 | 306 | $this->object->attach( $data, $filename, $mimetype ); |
307 | - } |
|
308 | - elseif( class_exists( '\Swift_Attachment' ) ) |
|
307 | + } elseif( class_exists( '\Swift_Attachment' ) ) |
|
309 | 308 | { |
310 | 309 | $part = \Swift_Attachment::newInstance( $data, $filename, $mimetype ); |
311 | 310 | $part->setDisposition( $disposition ); |
312 | 311 | $this->object->attach( $part ); |
313 | - } |
|
314 | - else |
|
312 | + } else |
|
315 | 313 | { |
316 | 314 | throw new \RuntimeException( 'Symfony mailer or Swiftmailer package missing' ); |
317 | 315 | } |
@@ -341,8 +339,7 @@ discard block |
||
341 | 339 | { |
342 | 340 | $this->object->embed( $data, $filename, $mimetype ); |
343 | 341 | return 'cid:' . $filename; |
344 | - } |
|
345 | - elseif( class_exists( '\Swift_EmbeddedFile' ) ) |
|
342 | + } elseif( class_exists( '\Swift_EmbeddedFile' ) ) |
|
346 | 343 | { |
347 | 344 | $part = \Swift_EmbeddedFile::newInstance( $data, $filename, $mimetype ); |
348 | 345 | return $this->object->embed( $part ); |