Code Duplication    Length = 10-10 lines in 3 locations

src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location

@@ 393-402 (lines=10) @@
390
     *
391
     * @return string
392
     */
393
    private function guessContentType($content)
394
    {
395
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
396
397
        if (is_resource($content)) {
398
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
399
        }
400
401
        return $fileInfo->buffer($content);
402
    }
403
}
404

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 341-350 (lines=10) @@
338
     *
339
     * @return string
340
     */
341
    private function guessContentType($content)
342
    {
343
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
344
345
        if (is_resource($content)) {
346
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
347
        }
348
349
        return $fileInfo->buffer($content);
350
    }
351
352
    public function mimeType($key)
353
    {

src/Gaufrette/Adapter/AzureBlobStorage.php 1 location

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