Skip to content

Commit c6a2274

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 d933717 commit c6a2274

File tree

6 files changed

+10
-20
lines changed

6 files changed

+10
-20
lines changed

src/Input/SendTaskFailureInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ final class SendTaskFailureInput extends Input
4040
* taskToken?: string,
4141
* error?: string,
4242
* cause?: string,
43-
*
44-
* @region?: string,
43+
* '@region'?: string|null,
4544
* } $input
4645
*/
4746
public function __construct(array $input = [])

src/Input/SendTaskHeartbeatInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ final class SendTaskHeartbeatInput extends Input
2424
/**
2525
* @param array{
2626
* taskToken?: string,
27-
*
28-
* @region?: string,
27+
* '@region'?: string|null,
2928
* } $input
3029
*/
3130
public function __construct(array $input = [])

src/Input/SendTaskSuccessInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ final class SendTaskSuccessInput extends Input
3535
* @param array{
3636
* taskToken?: string,
3737
* output?: string,
38-
*
39-
* @region?: string,
38+
* '@region'?: string|null,
4039
* } $input
4140
*/
4241
public function __construct(array $input = [])

src/Input/StartExecutionInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ final class StartExecutionInput extends Input
8989
* name?: string,
9090
* input?: string,
9191
* traceHeader?: string,
92-
*
93-
* @region?: string,
92+
* '@region'?: string|null,
9493
* } $input
9594
*/
9695
public function __construct(array $input = [])

src/Input/StopExecutionInput.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ final class StopExecutionInput extends Input
3737
* executionArn?: string,
3838
* error?: string,
3939
* cause?: string,
40-
*
41-
* @region?: string,
40+
* '@region'?: string|null,
4241
* } $input
4342
*/
4443
public function __construct(array $input = [])

src/StepFunctionsClient.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ class StepFunctionsClient extends AbstractApi
4646
* taskToken: string,
4747
* error?: string,
4848
* cause?: string,
49-
*
50-
* @region?: string,
49+
* '@region'?: string|null,
5150
* }|SendTaskFailureInput $input
5251
*
5352
* @throws TaskDoesNotExistException
@@ -87,8 +86,7 @@ public function sendTaskFailure($input): SendTaskFailureOutput
8786
*
8887
* @param array{
8988
* taskToken: string,
90-
*
91-
* @region?: string,
89+
* '@region'?: string|null,
9290
* }|SendTaskHeartbeatInput $input
9391
*
9492
* @throws TaskDoesNotExistException
@@ -119,8 +117,7 @@ public function sendTaskHeartbeat($input): SendTaskHeartbeatOutput
119117
* @param array{
120118
* taskToken: string,
121119
* output: string,
122-
*
123-
* @region?: string,
120+
* '@region'?: string|null,
124121
* }|SendTaskSuccessInput $input
125122
*
126123
* @throws TaskDoesNotExistException
@@ -192,8 +189,7 @@ public function sendTaskSuccess($input): SendTaskSuccessOutput
192189
* name?: string,
193190
* input?: string,
194191
* traceHeader?: string,
195-
*
196-
* @region?: string,
192+
* '@region'?: string|null,
197193
* }|StartExecutionInput $input
198194
*
199195
* @throws ExecutionLimitExceededException
@@ -234,8 +230,7 @@ public function startExecution($input): StartExecutionOutput
234230
* executionArn: string,
235231
* error?: string,
236232
* cause?: string,
237-
*
238-
* @region?: string,
233+
* '@region'?: string|null,
239234
* }|StopExecutionInput $input
240235
*
241236
* @throws ExecutionDoesNotExistException

0 commit comments

Comments
 (0)