Code Duplication    Length = 7-7 lines in 2 locations

system/vendor/swift/Swift.php 2 locations

@@ 337-343 (lines=7) @@
334
  public function send(Swift_Message $message, $recipients, $from)
335
  {
336
    Swift_ClassLoader::load("Swift_Message_Encoder");
337
    if (is_string($recipients) && preg_match("/^" . Swift_Message_Encoder::CHEAP_ADDRESS_RE . "\$/", $recipients))
338
    {
339
      $recipients = new Swift_Address($recipients);
340
    }
341
    elseif (!($recipients instanceof Swift_AddressContainer))
342
      throw new Exception("The recipients parameter must either be a valid string email address, ".
343
      "an instance of Swift_RecipientList or an instance of Swift_Address.");
344
      
345
    if (is_string($from) && preg_match("/^" . Swift_Message_Encoder::CHEAP_ADDRESS_RE . "\$/", $from))
346
    {
@@ 345-351 (lines=7) @@
342
      throw new Exception("The recipients parameter must either be a valid string email address, ".
343
      "an instance of Swift_RecipientList or an instance of Swift_Address.");
344
      
345
    if (is_string($from) && preg_match("/^" . Swift_Message_Encoder::CHEAP_ADDRESS_RE . "\$/", $from))
346
    {
347
      $from = new Swift_Address($from);
348
    }
349
    elseif (!($from instanceof Swift_Address))
350
      throw new Exception("The sender parameter must either be a valid string email address or ".
351
      "an instance of Swift_Address.");
352
    
353
    $log = Swift_LogContainer::getLog();
354