Skip to content

Commit 32676e2

Browse files
authored
Annotate return value of validateOperationParams as list
The list built with `$errors[] = …` exclusively, which means it cannot have gaps. The helps libraries using this method, as they can type the result passing through as `list<…>` as well.
1 parent 5ca3882 commit 32676e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/class-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ function parseRequestParams(string $method, array $bodyParams, array $queryParam
22252225
* Checks validity of OperationParams extracted from HTTP request and returns an array of errors
22262226
* if params are invalid (or empty array when params are valid).
22272227
*
2228-
* @return array<int, RequestError>
2228+
* @return list<RequestError>
22292229
*
22302230
* @api
22312231
*/

src/Server/Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function parseRequestParams(string $method, array $bodyParams, array $que
140140
* Checks validity of OperationParams extracted from HTTP request and returns an array of errors
141141
* if params are invalid (or empty array when params are valid).
142142
*
143-
* @return array<int, RequestError>
143+
* @return list<RequestError>
144144
*
145145
* @api
146146
*/

0 commit comments

Comments
 (0)