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

@@ 473-482 (lines=10) @@
470
     *
471
     * @return string
472
     */
473
    private function guessContentType($content)
474
    {
475
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
476
477
        if (is_resource($content)) {
478
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
479
        }
480
481
        return $fileInfo->buffer($content);
482
    }
483
484
    /**
485
     * @param string $key