Code Duplication    Length = 10-10 lines in 3 locations

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 323-332 (lines=10) @@
320
     *
321
     * @return string
322
     */
323
    private function guessContentType($content)
324
    {
325
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
326
327
        if (is_resource($content)) {
328
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
329
        }
330
331
        return $fileInfo->buffer($content);
332
    }
333
}
334

src/Gaufrette/Adapter/AzureBlobStorage.php 1 location

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

src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location

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