| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | abstract class AbstractItemRequest extends AbstractTableAwareRequest |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array Values that can be substituted in an expression. |
||
| 9 | */ |
||
| 10 | protected $expressionAttributeValues = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string The level of detail about provisioned throughput consumption that is returned in the response. |
||
| 14 | */ |
||
| 15 | protected $returnConsumedCapacity = ConsumedCapacityOptions::NONE; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Adds an ExpressionAttributeValue to the request. |
||
| 19 | * |
||
| 20 | * @param string $key The attribute token. |
||
| 21 | * @param mixed $value The attribute value. |
||
| 22 | * @return AbstractItemRequest An implementation of this abstract. |
||
| 23 | */ |
||
| 24 | 8 | final public function addExpressionAttributeValue(string $key, $value): AbstractItemRequest |
|
| 25 | { |
||
| 26 | 8 | $this->expressionAttributeValues[sprintf(':%s', $key)] = $this->marshaler->marshalValue($value); |
|
| 27 | 8 | return $this; |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Registers the desired level of consumption detail to return. |
||
| 32 | * |
||
| 33 | * @param string $returnConsumedCapacity The level of consumption detail to return. |
||
| 34 | * @return AbstractItemRequest An implementation of this abstract. |
||
| 35 | */ |
||
| 36 | 1 | final public function setReturnConsumedCapacity(string $returnConsumedCapacity): AbstractItemRequest |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritDoc} |
||
| 44 | */ |
||
| 45 | 21 | public function get(): array |
|
| 53 | } |
||
| 54 | } |
||
| 55 |