Code Duplication    Length = 3-3 lines in 2 locations

src/VCard.php 2 locations

@@ 228-230 (lines=3) @@
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
        }
231
        $fileType = strtoupper(substr($mimeType, 6));
232
233
        if ($include) {
@@ 276-278 (lines=3) @@
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
        }
279
        $fileType = strtoupper(substr($mimeType, 6));
280
281
        $content = base64_encode($content);