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/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

src/Gaufrette/Adapter/AzureBlobStorage.php 1 location

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