overloadEnvironmentVariables()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 1
nc 1
1
<?php
2
3
namespace AbacaphiliacFeature\AwsSdk\ClaimCheck\Bootstrap\ContextTrait;
4
5
trait AwsConfigContextTrait
6
{
7
    /**
8
     * @return mixed[]
9
     */
10
    abstract public function overloadEnvironmentVariables();
11
    
12
    /**
13
     * @return mixed[]
14
     */
15
    public function getAwsServiceConfig()
16
    {
17
        $this->overloadEnvironmentVariables();
18
        
19
        return [
20
            'region' => getenv('AWS_REGION') ?: 'us-west-2',
21
            'version' => getenv('AWS_VERSION') ?: 'latest',
22
            'credentials' => [
23
                'key' => getenv('AWS_KEY') ?: 'foo',
24
                'secret' => getenv('AWS_SECRET') ?: 'bar',
25
            ],
26
        ];
27
    }
28
}
29