Optional explicit setting of message recipients

by @kevinsmith

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

$ curl http://fabbot.io/patch/swiftmailer/swiftmailer/446/eedce389644d909139e0efa63674a561f672447d/cs.diff | patch -p0
diff -ru lib/classes/Swift/Mime/Message.php lib/classes/Swift/Mime/Message.php
--- lib/classes/Swift/Mime/Message.php	2017-05-19 13:16:41.509107349 +0000
+++ lib/classes/Swift/Mime/Message.php	2017-05-19 13:16:45.752976345 +0000
@@ -39,7 +39,7 @@
     /**
      * Set the origination date of the message as a UNIX timestamp.
      *
-     * @param int     $date
+     * @param int $date
      */
     public function setDate($date);
 
@@ -230,7 +230,7 @@
      * The first parameter may be a single email address given as a string or
      * multiple addresses given as an array.
      *
-     * @param mixed  $addresses
+     * @param mixed $addresses
      */
     public function setRecipients($addresses);
 
diff -ru lib/classes/Swift/Mime/SimpleMessage.php lib/classes/Swift/Mime/SimpleMessage.php
--- lib/classes/Swift/Mime/SimpleMessage.php	2017-05-19 13:16:41.725100685 +0000
+++ lib/classes/Swift/Mime/SimpleMessage.php	2017-05-19 13:16:45.260991532 +0000
@@ -94,7 +94,7 @@
     /**
      * Set the date at which this message was created.
      *
-     * @param int     $date
+     * @param int $date
      *
      * @return Swift_Mime_SimpleMessage
      */
@@ -470,7 +470,7 @@
      * The first parameter may be a single email address as a string or multiple
      * addresses given as an array.
      *
-     * @param mixed  $addresses
+     * @param mixed $addresses
      *
      * @return Swift_Mime_SimpleMessage
      */
@@ -506,7 +506,7 @@
      *
      * The value is an integer where 1 is the highest priority and 5 is the lowest.
      *
-     * @param int     $priority
+     * @param int $priority
      *
      * @return Swift_Mime_SimpleMessage
      */
@@ -552,7 +552,7 @@
     }
 
     /**
-     * Ask for a delivery receipt from the recipient to be sent to $addresses
+     * Ask for a delivery receipt from the recipient to be sent to $addresses.
      *
      * @param array $addresses
      *
diff -ru lib/classes/Swift/Transport/AbstractSmtpTransport.php lib/classes/Swift/Transport/AbstractSmtpTransport.php
--- lib/classes/Swift/Transport/AbstractSmtpTransport.php	2017-05-19 13:16:41.889095617 +0000
+++ lib/classes/Swift/Transport/AbstractSmtpTransport.php	2017-05-19 13:16:48.108903618 +0000
@@ -87,7 +87,7 @@
     }
 
     /**
-     * Returns the IP used to connect to the destination
+     * Returns the IP used to connect to the destination.
      *
      * @return string
      */
@@ -402,7 +402,7 @@
             do {
                 $line = $this->_buffer->readLine($seq);
                 $response .= $line;
-            } while (null !== $line && false !== $line && ' ' != $line{3});
+            } while (null !== $line && false !== $line && ' ' != $line[3]);
         } catch (Swift_TransportException $e) {
             $this->_throwException($e);
         } catch (Swift_IoException $e) {
@@ -423,7 +423,7 @@
         foreach ($recipients as $forwardPath) {
             try {
                 $this->_doRcptToCommand($forwardPath);
-                $sent++;
+                ++$sent;
             } catch (Swift_TransportException $e) {
                 $failedRecipients[] = $forwardPath;
             }

0
Common Typos

0
File Permissions