@@ -178,7 +178,7 @@ public static function findClassPointer(File $phpcsFile, int $functionPointer):
178178 }
179179
180180 /**
181- * @return string[]
181+ * @return list< string>
182182 */
183183 public static function getParametersNames (File $ phpcsFile , int $ functionPointer ): array
184184 {
@@ -197,7 +197,7 @@ public static function getParametersNames(File $phpcsFile, int $functionPointer)
197197 }
198198
199199 /**
200- * @return ( TypeHint|null)[]
200+ * @return array<string, TypeHint|null>
201201 */
202202 public static function getParametersTypeHints (File $ phpcsFile , int $ functionPointer ): array
203203 {
@@ -324,11 +324,11 @@ public static function hasReturnTypeHint(File $phpcsFile, int $functionPointer):
324324 }
325325
326326 /**
327- * @return ParameterAnnotation[]
327+ * @return list< ParameterAnnotation>
328328 */
329329 public static function getParametersAnnotations (File $ phpcsFile , int $ functionPointer ): array
330330 {
331- /** @var ParameterAnnotation[] $parametersAnnotations */
331+ /** @var list< ParameterAnnotation> $parametersAnnotations */
332332 $ parametersAnnotations = AnnotationHelper::getAnnotationsByName ($ phpcsFile , $ functionPointer , '@param ' );
333333 return $ parametersAnnotations ;
334334 }
@@ -348,7 +348,7 @@ public static function getValidParametersAnnotations(File $phpcsFile, int $funct
348348 continue ;
349349 }
350350
351- /** @var VariableAnnotation[] $varAnnotations */
351+ /** @var list< VariableAnnotation> $varAnnotations */
352352 $ varAnnotations = AnnotationHelper::getAnnotationsByName ($ phpcsFile , $ i , '@var ' );
353353 if ($ varAnnotations === []) {
354354 continue ;
@@ -388,7 +388,7 @@ public static function getValidPrefixedParametersAnnotations(File $phpcsFile, in
388388 continue ;
389389 }
390390
391- /** @var VariableAnnotation[] $varAnnotations */
391+ /** @var list< VariableAnnotation> $varAnnotations */
392392 $ varAnnotations = AnnotationHelper::getAnnotationsByName ($ phpcsFile , $ i , sprintf ('@%s-var ' , $ prefix ));
393393 if ($ varAnnotations === []) {
394394 continue ;
@@ -398,7 +398,7 @@ public static function getValidPrefixedParametersAnnotations(File $phpcsFile, in
398398 }
399399 }
400400
401- /** @var ParameterAnnotation[] $annotations */
401+ /** @var list< ParameterAnnotation> $annotations */
402402 $ annotations = AnnotationHelper::getAnnotationsByName ($ phpcsFile , $ functionPointer , sprintf ('@%s-param ' , $ prefix ));
403403 foreach ($ annotations as $ parameterAnnotation ) {
404404 if ($ parameterAnnotation ->getContent () === null ) {
@@ -418,7 +418,7 @@ public static function getValidPrefixedParametersAnnotations(File $phpcsFile, in
418418
419419 public static function findReturnAnnotation (File $ phpcsFile , int $ functionPointer ): ?ReturnAnnotation
420420 {
421- /** @var ReturnAnnotation[] $returnAnnotations */
421+ /** @var list< ReturnAnnotation> $returnAnnotations */
422422 $ returnAnnotations = AnnotationHelper::getAnnotationsByName ($ phpcsFile , $ functionPointer , '@return ' );
423423
424424 if (count ($ returnAnnotations ) === 0 ) {
@@ -429,14 +429,14 @@ public static function findReturnAnnotation(File $phpcsFile, int $functionPointe
429429 }
430430
431431 /**
432- * @return ReturnAnnotation[]
432+ * @return list< ReturnAnnotation>
433433 */
434434 public static function getValidPrefixedReturnAnnotations (File $ phpcsFile , int $ functionPointer ): array
435435 {
436436 $ returnAnnotations = [];
437437
438438 foreach (AnnotationHelper::STATIC_ANALYSIS_PREFIXES as $ prefix ) {
439- /** @var ReturnAnnotation[] $annotations */
439+ /** @var list< ReturnAnnotation> $annotations */
440440 $ annotations = AnnotationHelper::getAnnotationsByName ($ phpcsFile , $ functionPointer , sprintf ('@%s-return ' , $ prefix ));
441441 foreach ($ annotations as $ annotation ) {
442442 if (!$ annotation ->isInvalid ()) {
@@ -450,7 +450,7 @@ public static function getValidPrefixedReturnAnnotations(File $phpcsFile, int $f
450450 }
451451
452452 /**
453- * @return string[]
453+ * @return list< string>
454454 */
455455 public static function getAllFunctionNames (File $ phpcsFile ): array
456456 {
0 commit comments