Code Duplication    Length = 9-15 lines in 2 locations

src/Gaufrette/Adapter/AmazonS3.php 1 location

@@ 25-33 (lines=9) @@
22
    protected $metadata;
23
    protected $options;
24
25
    public function __construct(AmazonClient $service, $bucket, $options = array())
26
    {
27
        $this->service = $service;
28
        $this->bucket = $bucket;
29
        $this->options = array_replace_recursive(
30
            array('directory' => '', 'create' => false, 'region' => $service->hostname, 'acl' => AmazonClient::ACL_PUBLIC),
31
            $options
32
        );
33
    }
34
35
    /**
36
     * Set the acl used when writing files.

src/Gaufrette/Adapter/AwsS3.php 1 location

@@ 26-40 (lines=15) @@
23
    protected $metadata = array();
24
    protected $detectContentType;
25
26
    public function __construct(S3Client $service, $bucket, array $options = array(), $detectContentType = false)
27
    {
28
        $this->service = $service;
29
        $this->bucket = $bucket;
30
        $this->options = array_replace(
31
            array(
32
                'create' => false,
33
                'directory' => '',
34
                'acl' => 'private',
35
            ),
36
            $options
37
        );
38
39
        $this->detectContentType = $detectContentType;
40
    }
41
42
    /**
43
     * Gets the publicly accessible URL of an Amazon S3 object.