Code Duplication    Length = 10-10 lines in 3 locations

src/Gaufrette/Adapter/AzureBlobStorage.php 1 location

@@ 519-528 (lines=10) @@
516
     *
517
     * @return string
518
     */
519
    private function guessContentType($content)
520
    {
521
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
522
523
        if (is_resource($content)) {
524
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
525
        }
526
527
        return $fileInfo->buffer($content);
528
    }
529
530
    /**
531
     * @param string $key

src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location

@@ 387-396 (lines=10) @@
384
     *
385
     * @return string
386
     */
387
    private function guessContentType($content)
388
    {
389
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
390
391
        if (is_resource($content)) {
392
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
393
        }
394
395
        return $fileInfo->buffer($content);
396
    }
397
}
398

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 484-493 (lines=10) @@
481
     *
482
     * @return string
483
     */
484
    private function guessContentType($content)
485
    {
486
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
487
488
        if (is_resource($content)) {
489
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
490
        }
491
492
        return $fileInfo->buffer($content);
493
    }
494
495
    /**
496
     * @param string $key