Completed
Push — master ( a7a349...3fc402 )
by Guillermo A.
03:23
created

AbstractDynamoDbClientAware::getMarshaler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Guillermoandrae\DynamoDb\Contract;
4
5
use Aws\DynamoDb\DynamoDbClient;
6
use Aws\DynamoDb\Marshaler;
7
8
abstract class AbstractDynamoDbClientAware implements DynamoDbClientAwareInterface
9
{
10
    /**
11
     * @var DynamoDbClient The DynamoDb client.
12
     */
13
    protected $client;
14
15
    /**
16
     * @var Marshaler The Marshaler.
17
     */
18
    protected $marshaler;
19
20
    /**
21
     * Registers the client.
22
     *
23
     * @param mixed $client The client.
24
     * @return DynamoDbClientAwareInterface This object.
25
     */
26 42
    public function setClient(DynamoDbClient $client): DynamoDbClientAwareInterface
27
    {
28 42
        $this->client = $client;
29 42
        return $this;
30
    }
31
32
    /**
33
     * Returns the client.
34
     *
35
     * @return DynamoDbClient The client.
36
     */
37 1
    public function getClient(): DynamoDbClient
38
    {
39 1
        return $this->client;
40
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45 42
    final public function setMarshaler(Marshaler $marshaler): DynamoDbClientAwareInterface
46
    {
47 42
        $this->marshaler = $marshaler;
48 42
        return $this;
49
    }
50
51
    /**
52
     * {@inheritDoc}
53
     */
54
    final public function getMarshaler(): Marshaler
55
    {
56
        return $this->marshaler;
57
    }
58
}
59