From 716024c91ec511c315f3ead50fbe8f7fdee0bc29 Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+max-s-lab@users.noreply.github.com> Date: Tue, 7 Oct 2025 09:10:36 +0400 Subject: [PATCH] Remove array shapes from `@return` annotations (#20580) --- framework/web/Controller.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/web/Controller.php b/framework/web/Controller.php index 9a469963ef..f17e5c59b9 100644 --- a/framework/web/Controller.php +++ b/framework/web/Controller.php @@ -203,7 +203,9 @@ class Controller extends \yii\base\Controller * if the function parameter has a single named type. * @param mixed $param The parameter value. * @param \ReflectionNamedType $type - * @return array{0: mixed, 1: bool} The resulting parameter value and a boolean indicating whether the value is valid. + * @return array The resulting parameter value and a boolean indicating whether the value is valid. + * + * @phpstan-return array{mixed, bool} */ private function filterSingleTypeActionParam($param, $type) { @@ -248,7 +250,9 @@ class Controller extends \yii\base\Controller * if the function parameter has a union type. * @param mixed $param The parameter value. * @param \ReflectionUnionType $type - * @return array{0: mixed, 1: bool} The resulting parameter value and a boolean indicating whether the value is valid. + * @return array The resulting parameter value and a boolean indicating whether the value is valid. + * + * @phpstan-return array{mixed, bool} */ private function filterUnionTypeActionParam($param, $type) {