Skip to content

Commit 71dcb26

Browse files
authored
Typehint Iterator intead of caller methods (#672)
1 parent cf95222 commit 71dcb26

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/DynamoDbClient.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
use AsyncAws\DynamoDb\Result\UpdateItemOutput;
3333
use AsyncAws\DynamoDb\Result\UpdateTableOutput;
3434
use AsyncAws\DynamoDb\Result\UpdateTimeToLiveOutput;
35-
use AsyncAws\DynamoDb\ValueObject\AttributeValue;
3635

3736
class DynamoDbClient extends AbstractApi
3837
{
@@ -169,8 +168,6 @@ public function getItem($input): GetItemOutput
169168
* Limit?: int,
170169
* @region?: string,
171170
* }|ListTablesInput $input
172-
*
173-
* @return \Traversable<string> & ListTablesOutput
174171
*/
175172
public function listTables($input = []): ListTablesOutput
176173
{
@@ -237,8 +234,6 @@ public function putItem($input): PutItemOutput
237234
* ExpressionAttributeValues?: array<string, \AsyncAws\DynamoDb\ValueObject\AttributeValue>,
238235
* @region?: string,
239236
* }|QueryInput $input
240-
*
241-
* @return \Traversable<array<string, AttributeValue>> & QueryOutput
242237
*/
243238
public function query($input): QueryOutput
244239
{
@@ -273,8 +268,6 @@ public function query($input): QueryOutput
273268
* ConsistentRead?: bool,
274269
* @region?: string,
275270
* }|ScanInput $input
276-
*
277-
* @return \Traversable<array<string, AttributeValue>> & ScanOutput
278271
*/
279272
public function scan($input): ScanOutput
280273
{

src/Result/ListTablesOutput.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use AsyncAws\DynamoDb\DynamoDbClient;
88
use AsyncAws\DynamoDb\Input\ListTablesInput;
99

10+
/**
11+
* @implements \IteratorAggregate<string>
12+
*/
1013
class ListTablesOutput extends Result implements \IteratorAggregate
1114
{
1215
/**

src/Result/QueryOutput.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use AsyncAws\DynamoDb\ValueObject\Capacity;
1111
use AsyncAws\DynamoDb\ValueObject\ConsumedCapacity;
1212

13+
/**
14+
* @implements \IteratorAggregate<array<string, AttributeValue>>
15+
*/
1316
class QueryOutput extends Result implements \IteratorAggregate
1417
{
1518
/**

src/Result/ScanOutput.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use AsyncAws\DynamoDb\ValueObject\Capacity;
1111
use AsyncAws\DynamoDb\ValueObject\ConsumedCapacity;
1212

13+
/**
14+
* @implements \IteratorAggregate<array<string, AttributeValue>>
15+
*/
1316
class ScanOutput extends Result implements \IteratorAggregate
1417
{
1518
/**

0 commit comments

Comments
 (0)