SignatureAuto   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
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
     * @param string $bucket
17
     * @param string $region
18
     * @param array  $options
19
     */
20
    public function __construct(string $bucket, string $region = "us-east-1", array $options = [])
21
    {
22
        $key = getenv('AWS_ACCESS_KEY_ID');
23
        $secret = getenv('AWS_SECRET_ACCESS_KEY');
24
        parent::__construct($key, $secret, $bucket, $region, $options);
25
    }
26
}
27