Skip to content

Commit 0e546d3

Browse files
authored
Generate valid phpdoc param tags (#1457)
* Fix the phpdoc of the RequestContext * Generate valid phpdoc param tags When an array shape key starts with a `@` like `@region`, it must be quoted in the phpdoc as the unquoted one would be interpreted as the next phpdoc tag. * Use an unsealed shape for the type in Input This avoids reports about passing extra keys from child classes in Psalm. * Allow passing null as the region in the input The base input class already accept null values in addition to omitted values for the region. * Update the psalm baseline * Disallow invalid docblocks in Psalm as well
1 parent 13eb340 commit 0e546d3

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/FirehoseClient.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class FirehoseClient extends AbstractApi
5858
* @param array{
5959
* DeliveryStreamName: string,
6060
* Record: Record|array,
61-
*
62-
* @region?: string,
61+
* '@region'?: string|null,
6362
* }|PutRecordInput $input
6463
*
6564
* @throws ResourceNotFoundException
@@ -136,8 +135,7 @@ public function putRecord($input): PutRecordOutput
136135
* @param array{
137136
* DeliveryStreamName: string,
138137
* Records: Record[],
139-
*
140-
* @region?: string,
138+
* '@region'?: string|null,
141139
* }|PutRecordBatchInput $input
142140
*
143141
* @throws ResourceNotFoundException

src/Input/PutRecordBatchInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ final class PutRecordBatchInput extends Input
3232
* @param array{
3333
* DeliveryStreamName?: string,
3434
* Records?: Record[],
35-
*
36-
* @region?: string,
35+
* '@region'?: string|null,
3736
* } $input
3837
*/
3938
public function __construct(array $input = [])

src/Input/PutRecordInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ final class PutRecordInput extends Input
3232
* @param array{
3333
* DeliveryStreamName?: string,
3434
* Record?: Record|array,
35-
*
36-
* @region?: string,
35+
* '@region'?: string|null,
3736
* } $input
3837
*/
3938
public function __construct(array $input = [])

0 commit comments

Comments
 (0)