Code Duplication    Length = 10-10 lines in 2 locations

system/vendor/swift/Swift/Message/Part.php 1 location

@@ 38-47 (lines=10) @@
35
    $this->setCharset($charset);
36
    $this->setFlowed(false);
37
    
38
    if ($data !== null)
39
    {
40
      $this->setData($data);
41
      if ($charset === null)
42
      {
43
        Swift_ClassLoader::load("Swift_Message_Encoder");
44
        if (is_string($data) && Swift_Message_Encoder::instance()->isUTF8($data)) $this->setCharset("utf-8");
45
        else $this->setCharset("iso-8859-1"); //The likely encoding
46
      }
47
    }
48
  }
49
  /**
50
   * Get the level in the MIME hierarchy at which this section should appear.

system/vendor/swift/Swift/Message.php 1 location

@@ 108-117 (lines=10) @@
105
    "Consider upgrading your mail client to view this message correctly."
106
    );
107
    
108
    if ($body !== null)
109
    {
110
      $this->setData($body);
111
      if ($charset === null)
112
      {
113
        Swift_ClassLoader::load("Swift_Message_Encoder");
114
        if (Swift_Message_Encoder::instance()->isUTF8($body)) $this->setCharset("utf-8");
115
        else $this->setCharset("iso-8859-1");
116
      }
117
    }
118
  }
119
  /**
120
   * Sets a reference so when nodes are nested, operations can be redirected.