Code Duplication    Length = 10-10 lines in 2 locations

src/Gaufrette/Adapter/AzureBlobStorage.php 1 location

@@ 495-504 (lines=10) @@
492
     *
493
     * @return string
494
     */
495
    private function guessContentType($content)
496
    {
497
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
498
499
        if (is_resource($content)) {
500
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
501
        }
502
503
        return $fileInfo->buffer($content);
504
    }
505
506
    /**
507
     * @param string $key

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 369-378 (lines=10) @@
366
     *
367
     * @return string
368
     */
369
    private function guessContentType($content)
370
    {
371
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
372
373
        if (is_resource($content)) {
374
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
375
        }
376
377
        return $fileInfo->buffer($content);
378
    }
379
380
    public function mimeType($key)
381
    {