Passed
Pull Request — master (#29)
by Csaba
02:45
created

Finder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 21
c 0
b 0
f 0
wmc 3
lcom 2
cbo 2
ccs 10
cts 10
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 5 1
A createClient() 0 12 2
1
<?php
2
namespace Fathomminds\Rest\Database\DynamoDb;
3
4
use Fathomminds\Rest\Database\Finder as BaseFinder;
5
use Aws\DynamoDb\DynamoDbClient as Client;
6
use Aws\Sdk;
7
8
class Finder extends BaseFinder
9
{
10 1
    public function get()
11
    {
12 1
        $this->resultSet = [];
13 1
        return $this;
14
    }
15
16 1
    protected function createClient()
17
    {
18 1
        $sdk = new Sdk([
19 1
            'region' => getenv('AWS_SDK_REGION'),
20 1
            'version' => getenv('AWS_SDK_VERSION'),
21
            'http' => [
22 1
                'verify' => getenv('AWS_SDK_HTTP_VERIFY') === 'false' ? false : getenv('AWS_SDK_HTTP_VERIFY'),
23
            ]
24
        ]);
25 1
        $this->client = $sdk->createDynamoDb();
26 1
        return $this;
27
    }
28
}
29