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

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

src/Gaufrette/Adapter/GoogleCloudStorage.php 1 location

@@ 379-388 (lines=10) @@
376
     *
377
     * @return string
378
     */
379
    private function guessContentType($content)
380
    {
381
        $fileInfo = new \finfo(FILEINFO_MIME_TYPE);
382
383
        if (is_resource($content)) {
384
            return $fileInfo->file(stream_get_meta_data($content)['uri']);
385
        }
386
387
        return $fileInfo->buffer($content);
388
    }
389
}
390