Code Duplication    Length = 3-3 lines in 2 locations

src/VCard.php 2 locations

@@ 225-227 (lines=3) @@
222
            //Local file, so inspect it directly
223
            $mimeType = mime_content_type($url);
224
        }
225
        if (strpos($mimeType, ';') !== false) {
226
            $mimeType = strstr($mimeType, ';', true);
227
        }
228
        if (!is_string($mimeType) || substr($mimeType, 0, 6) !== 'image/') {
229
            throw VCardException::invalidImage();
230
        }
@@ 273-275 (lines=3) @@
270
        $finfo = new \finfo();
271
        $mimeType = $finfo->buffer($content, FILEINFO_MIME_TYPE);
272
273
        if (strpos($mimeType, ';') !== false) {
274
            $mimeType = strstr($mimeType, ';', true);
275
        }
276
        if (!is_string($mimeType) || substr($mimeType, 0, 6) !== 'image/') {
277
            throw VCardException::invalidImage();
278
        }