Skip to content

Commit 45e18b8

Browse files
Supporting passing the client and marshaler to the constructor (big oversight).
1 parent 9779bf1 commit 45e18b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DynamoDb/DynamoDbAdapter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public function __construct(?DynamoDbClient $client = null, ?Marshaler $marshale
3838
{
3939
if (empty($client)) {
4040
$client = DynamoDbClientFactory::factory();
41-
$this->setClient($client);
42-
OperationFactory::setClient($client);
4341
}
42+
$this->setClient($client);
43+
OperationFactory::setClient($client);
4444

4545
if (empty($marshaler)) {
4646
$marshaler = MarshalerFactory::factory();
47-
$this->setMarshaler($marshaler);
48-
OperationFactory::setMarshaler($marshaler);
4947
}
48+
$this->setMarshaler($marshaler);
49+
OperationFactory::setMarshaler($marshaler);
5050
}
5151

5252
public function createTable(array $data, ?string $tableName = '', ?array $options = []): bool

0 commit comments

Comments
 (0)