Completed
Push — master ( d587ff...923e7c )
by Edd
21s queued 10s
created

SignatureAuto::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace EddTurtle\DirectUpload;
4
5
/**
6
 * Class SignatureAuto
7
 *
8
 * A child of Signature, especially for use without specifying credentials but using environment
9
 * variables instead.
10
 *
11
 * @package EddTurtle\DirectUpload
12
 */
13
class SignatureAuto extends Signature
14
{
15
16
    public function __construct($bucket, $region = "us-east-1", $options = [])
17
    {
18
        $key = getenv('AWS_ACCESS_KEY_ID');
19
        $secret = getenv('AWS_SECRET_ACCESS_KEY');
20
        parent::__construct($key, $secret, $bucket, $region, $options);
21
    }
22
23
}
24