Code Duplication    Length = 8-8 lines in 3 locations

src/Message.php 3 locations

@@ 207-214 (lines=8) @@
204
     * @param string $charset
205
     * @return string
206
     */
207
    public function getTextContent($index = 0, $transferEncoding = null, $charset = null)
208
    {
209
        $part = $this->getTextPart($index);
210
        if ($part !== null) {
211
            return $part->getContent($transferEncoding, $charset);
212
        }
213
        return null;
214
    }
215
216
    /**
217
     * Returns a resource handle where the 'inline' text/html content at the
@@ 225-232 (lines=8) @@
222
     * @param string $charset
223
     * @return resource
224
     */
225
    public function getHtmlStream($index = 0, $transferEncoding = null, $charset = null)
226
    {
227
        $htmlPart = $this->getHtmlPart($index);
228
        if ($htmlPart !== null) {
229
            return $htmlPart->getContentResourceHandle($transferEncoding, $charset);
230
        }
231
        return null;
232
    }
233
234
    /**
235
     * Returns the content of the inline text/html part at the given index.
@@ 245-252 (lines=8) @@
242
     * @param string $charset
243
     * @return string
244
     */
245
    public function getHtmlContent($index = 0, $transferEncoding = null, $charset = null)
246
    {
247
        $part = $this->getHtmlPart($index);
248
        if ($part !== null) {
249
            return $part->getContent($transferEncoding, $charset);
250
        }
251
        return null;
252
    }
253
254
    /**
255
     * Returns true if either a Content-Type or Mime-Version header are defined