Code Duplication    Length = 10-10 lines in 3 locations

src/Gaufrette/Adapter/AwsS3.php 1 location

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

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/AzureBlobStorage.php 1 location

@@ 428-437 (lines=10) @@
425
     *
426
     * @return string
427
     */
428
    private function guessContentType($content)
429
    {
430
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
431
432
        if (is_resource($content)) {
433
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
434
        }
435
436
        return $fileInfo->buffer($content);
437
    }
438
}
439