Skip to content

Commit b3c7b2a

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 4412d88 commit b3c7b2a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/ComprehendClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class ComprehendClient extends AbstractApi
2626
*
2727
* @param array{
2828
* Text: string,
29-
*
30-
* @region?: string,
29+
* '@region'?: string|null,
3130
* }|DetectDominantLanguageRequest $input
3231
*
3332
* @throws InvalidRequestException

src/Input/DetectDominantLanguageRequest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ final class DetectDominantLanguageRequest extends Input
2121
/**
2222
* @param array{
2323
* Text?: string,
24-
*
25-
* @region?: string,
24+
* '@region'?: string|null,
2625
* } $input
2726
*/
2827
public function __construct(array $input = [])

0 commit comments

Comments
 (0)