Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | final class PutItemRequest extends AbstractItemRequest |
||
8 | { |
||
9 | /** |
||
10 | * @var array $item The item data. |
||
11 | */ |
||
12 | private $item; |
||
13 | |||
14 | /** |
||
15 | * Registers the Marshaler, table name, and item data with this object. |
||
16 | * |
||
17 | * @param Marshaler $marshaler The Marshaler. |
||
18 | * @param string $tableName The table name. |
||
19 | * @param array $item The item data. |
||
20 | */ |
||
21 | 7 | public function __construct(Marshaler $marshaler, string $tableName, array $item) |
|
22 | { |
||
23 | 7 | parent::__construct($marshaler, $tableName); |
|
24 | 7 | $this->setItem($item); |
|
25 | 7 | } |
|
26 | |||
27 | /** |
||
28 | * Registers the item data with this object. |
||
29 | * |
||
30 | * @param array $item The item data. |
||
31 | * @return PutItemRequest This object. |
||
32 | */ |
||
33 | 7 | public function setItem(array $item): PutItemRequest |
|
34 | { |
||
35 | 7 | $this->item = $this->marshaler->marshalItem($item); |
|
36 | 7 | return $this; |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * {@inheritDoc} |
||
41 | */ |
||
42 | 7 | public function get(): array |
|
47 | ]; |
||
48 | } |
||
49 | } |
||
50 |