Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | abstract class AbstractOperation implements OperationInterface |
||
9 | { |
||
10 | use DynamoDbClientAwareTrait; |
||
11 | |||
12 | /** |
||
13 | * @var string The table name. |
||
14 | */ |
||
15 | protected $tableName; |
||
16 | |||
17 | /** |
||
18 | * Registers the DynamoDb client, Marshaler, and table name with this object. |
||
19 | * |
||
20 | * @param DynamoDbClient $client The DynamoDb client. |
||
21 | * @param Marshaler $marshaler The Marshaler. |
||
22 | * @param string $tableName The table name. |
||
23 | */ |
||
24 | 28 | public function __construct(DynamoDbClient $client, Marshaler $marshaler, string $tableName) |
|
25 | { |
||
26 | 28 | $this->setClient($client); |
|
27 | 28 | $this->setMarshaler($marshaler); |
|
28 | 28 | $this->setTableName($tableName); |
|
29 | 28 | } |
|
30 | |||
31 | /** |
||
32 | * Registers the table name. |
||
33 | * |
||
34 | * @param string $tableName The table name. |
||
35 | * @return OperationInterface This object. |
||
36 | */ |
||
37 | 32 | final public function setTableName(string $tableName): OperationInterface |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * {@inheritDoc} |
||
45 | */ |
||
46 | 35 | public function toArray(): array |
|
50 | ]; |
||
51 | } |
||
53 |