Code Duplication    Length = 8-8 lines in 2 locations

src/Message/MimePart.php 2 locations

@@ 250-257 (lines=8) @@
247
     * @param string $mimeType
248
     * @return \ZBateson\MailMimeParser\Message\MimePart or null
249
     */
250
    public function getPartByMimeType($mimeType)
251
    {
252
        $key = strtolower($mimeType);
253
        if (isset($this->mimeToPart[$key])) {
254
            return $this->mimeToPart[$key][0];
255
        }
256
        return null;
257
    }
258
    
259
    /**
260
     * Returns an array of all parts associated with the passed mime type if any
@@ 266-273 (lines=8) @@
263
     * @param string $mimeType
264
     * @return \ZBateson\MailMimeParser\Message\MimePart[] or null
265
     */
266
    public function getAllPartsByMimeType($mimeType)
267
    {
268
        $key = strtolower($mimeType);
269
        if (isset($this->mimeToPart[$key])) {
270
            return $this->mimeToPart[$key];
271
        }
272
        return null;
273
    }
274
275
    /**
276
     * Returns true if there's a content stream associated with the part.