Passed
Push — develop ( 60641a...1612eb )
by Csaba
58s
created

Finder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 21
c 0
b 0
f 0
wmc 3
lcom 2
cbo 2
ccs 0
cts 10
cp 0
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
    public function get()
11
    {
12
        $this->resultSet = [];
13
        return $this;
14
    }
15
16
    protected function createClient()
17
    {
18
        $sdk = new Sdk([
19
            'region' => getenv('AWS_SDK_REGION'),
20
            'version' => getenv('AWS_SDK_VERSION'),
21
            'http' => [
22
                'verify' => getenv('AWS_SDK_HTTP_VERIFY') === 'false' ? false : getenv('AWS_SDK_HTTP_VERIFY'),
23
            ]
24
        ]);
25
        $this->client = $sdk->createDynamoDb();
26
        return $this;
27
    }
28
}
29